| Index: remoting/webapp/crd/js/crd_event_handlers.js
|
| diff --git a/remoting/webapp/crd/js/crd_event_handlers.js b/remoting/webapp/crd/js/crd_event_handlers.js
|
| index 2f754397b1cba7c52fb122fa8accfcfbf1551f62..680cea732a1282f8a30c10a6f6c4a2ddbf24d982 100644
|
| --- a/remoting/webapp/crd/js/crd_event_handlers.js
|
| +++ b/remoting/webapp/crd/js/crd_event_handlers.js
|
| @@ -38,26 +38,8 @@ remoting.initElementEventHandlers = function() {
|
| remoting.setMode(remoting.AppMode.CLIENT_CONNECTING);
|
| remoting.app.getSessionConnector().reconnect();
|
| };
|
| - var doAuthRedirect = function() {
|
| - if (!base.isAppsV2()) {
|
| - remoting.oauth2.doAuthRedirect(function() {
|
| - window.location.reload();
|
| - });
|
| - }
|
| - };
|
| - var fixAuthError = function() {
|
| - if (base.isAppsV2()) {
|
| - var onRefresh = function() {
|
| - remoting.hostList.display();
|
| - };
|
| - var refreshHostList = function() {
|
| - goHome();
|
| - remoting.hostList.refresh(onRefresh);
|
| - };
|
| - remoting.identity.removeCachedAuthToken(refreshHostList);
|
| - } else {
|
| - doAuthRedirect();
|
| - }
|
| + var handleAuthFailure = function() {
|
| + remoting.identity.handleAuthFailureAndRelaunch();
|
| };
|
| /** @param {Event} event The event. */
|
| var stopDaemon = function(event) {
|
| @@ -105,11 +87,11 @@ remoting.initElementEventHandlers = function() {
|
| ];
|
| /** @type {Array.<{event: string, id: string, fn: function(Event):void}>} */
|
| var auth_actions = [
|
| - { event: 'click', id: 'auth-button', fn: doAuthRedirect },
|
| { event: 'click', id: 'cancel-connect-button', fn: goHome },
|
| { event: 'click', id: 'sign-out', fn:remoting.signOut },
|
| { event: 'click', id: 'token-refresh-error-ok', fn: goHome },
|
| - { event: 'click', id: 'token-refresh-error-sign-in', fn: fixAuthError }
|
| + { event: 'click', id: 'token-refresh-error-sign-in',
|
| + fn: handleAuthFailure }
|
| ];
|
| registerEventListeners(it2me_actions);
|
| registerEventListeners(me2me_actions);
|
|
|