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..9196e6b3792fc4bae2e7d473d57ada92f35bf7f1 100644 |
--- a/remoting/webapp/crd/js/crd_event_handlers.js |
+++ b/remoting/webapp/crd/js/crd_event_handlers.js |
@@ -38,27 +38,6 @@ 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(); |
- } |
- }; |
/** @param {Event} event The event. */ |
var stopDaemon = function(event) { |
remoting.hostSetupDialog.showForStop(); |
@@ -105,11 +84,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: remoting.handleAuthFailureAndRelaunch } |
]; |
registerEventListeners(it2me_actions); |
registerEventListeners(me2me_actions); |