Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: remoting/webapp/crd/js/remoting.js

Issue 868203002: Handle authentication failures in the v2 app by restarting the app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/crd/js/remoting.js
diff --git a/remoting/webapp/crd/js/remoting.js b/remoting/webapp/crd/js/remoting.js
index ba07e04ff2227519feb8d51c3e4d89821584a500..9370138972c1a5a48c9e2ed0d25fa4a467743355 100644
--- a/remoting/webapp/crd/js/remoting.js
+++ b/remoting/webapp/crd/js/remoting.js
@@ -199,9 +199,13 @@ remoting.showErrorMessage = function(error) {
document.getElementById('token-refresh-error-message'),
error);
var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED);
- document.getElementById('token-refresh-auth-failed').hidden = !auth_failed;
- document.getElementById('token-refresh-other-error').hidden = auth_failed;
- remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED);
+ if (base.isAppsV2()) {
+ remoting.identity.handleAuthFailure();
+ } else {
+ document.getElementById('token-refresh-auth-failed').hidden = !auth_failed;
+ document.getElementById('token-refresh-other-error').hidden = auth_failed;
+ remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED);
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698