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

Unified Diff: remoting/webapp/crd/js/desktop_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/desktop_remoting.js
diff --git a/remoting/webapp/crd/js/desktop_remoting.js b/remoting/webapp/crd/js/desktop_remoting.js
index ab266268e261f9d811f05e1704148798f87e477a..3135c7d9acf65fe0cdfe38d12e87010fc000d643 100644
--- a/remoting/webapp/crd/js/desktop_remoting.js
+++ b/remoting/webapp/crd/js/desktop_remoting.js
@@ -279,6 +279,12 @@ remoting.DesktopRemoting.prototype.handleError = function(errorTag) {
console.error('Connection failed: ' + errorTag);
remoting.accessCode = '';
+ if (errorTag === remoting.Error.AUTHENTICATION_FAILED) {
+ remoting.setMode(remoting.AppMode.HOME);
Jamie 2015/01/23 23:33:26 We should still show an error in this case. Would
kelvinp 2015/01/28 00:26:45 Ya, it would be some work to show the error cleanl
+ remoting.identity.handleAuthFailureAndRelaunch();
+ return;
+ }
+
// Reset the refresh flag so that the next connection will retry if needed.
this.refreshHostJidIfOffline_ = true;

Powered by Google App Engine
This is Rietveld 408576698