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

Issue 868203002: Handle authentication failures in the v2 app by restarting the app (Closed)

Created:
5 years, 11 months ago by kelvinp
Modified:
5 years, 10 months ago
Reviewers:
Jamie, garykac
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle authentication failures in the v2 app by restarting the app This CL handles the case when a token is revoked, e.g. via https://security.google.com/settings/security/permissions. We need to instruct chrome.identity to remove the invalid cached token and fetch a new one. The app would then be reloaded app as some of the app components (wcs sandbox) cached the invalid token and cannot be cleanly reinitialized. Summary of changes: 1. Implement app reloading using chrome.app.AppWindow API's and base.Ipc so that it can be called from foreground pages 2. Implement handleAuthFailure in remoting.identity and remoting.oauth2. In remoting.identity, we would remove the cached token and request a new one by prompting the user for consent. 3. Modify the call sites to use the new method. BUG=339677 Committed: https://crrev.com/2589f69a7fb7be7586f075af0b9029517543ed31 Cr-Commit-Position: refs/heads/master@{#313807}

Patch Set 1 : #

Total comments: 32

Patch Set 2 : Address reviewer's feedback #

Total comments: 10

Patch Set 3 : Address CL feedback #

Total comments: 9

Patch Set 4 : Ready for Check in #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -167 lines) Patch
M remoting/remoting_webapp_files.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/base/js/auth_dialog.js View 1 2 3 2 chunks +77 lines, -9 lines 0 comments Download
M remoting/webapp/base/js/auth_init.js View 1 2 2 chunks +27 lines, -33 lines 0 comments Download
A remoting/webapp/crd/js/activation_handler.js View 1 2 1 chunk +72 lines, -0 lines 0 comments Download
M remoting/webapp/crd/js/app_launcher.js View 1 2 3 4 4 chunks +48 lines, -13 lines 0 comments Download
M remoting/webapp/crd/js/background.js View 1 2 2 chunks +3 lines, -52 lines 0 comments Download
M remoting/webapp/crd/js/crd_event_handlers.js View 1 2 3 2 chunks +2 lines, -23 lines 0 comments Download
M remoting/webapp/crd/js/desktop_remoting.js View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M remoting/webapp/crd/js/host_list.js View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M remoting/webapp/crd/js/identity.js View 1 2 3 5 chunks +32 lines, -24 lines 0 comments Download
M remoting/webapp/crd/js/it2me_helpee_channel.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M remoting/webapp/crd/js/oauth2.js View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M remoting/webapp/crd/js/remoting.js View 1 2 3 4 2 chunks +12 lines, -7 lines 0 comments Download
M remoting/webapp/js_proto/dom_proto.js View 1 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
kelvinp
PTAL https://codereview.chromium.org/868203002/diff/20001/remoting/webapp/crd/js/activation_handler.js File remoting/webapp/crd/js/activation_handler.js (right): https://codereview.chromium.org/868203002/diff/20001/remoting/webapp/crd/js/activation_handler.js#newcode6 remoting/webapp/crd/js/activation_handler.js:6: var remoting = remoting || {}; This file ...
5 years, 11 months ago (2015-01-23 22:25:07 UTC) #3
kelvinp
Adding Gary for FYI
5 years, 11 months ago (2015-01-23 23:23:16 UTC) #5
Jamie
I think it's worth splitting this into a CL that introduces the new IPC class ...
5 years, 11 months ago (2015-01-23 23:33:27 UTC) #6
kelvinp
PTAL https://codereview.chromium.org/868203002/diff/20001/remoting/webapp/crd/js/activation_handler.js File remoting/webapp/crd/js/activation_handler.js (right): https://codereview.chromium.org/868203002/diff/20001/remoting/webapp/crd/js/activation_handler.js#newcode6 remoting/webapp/crd/js/activation_handler.js:6: var remoting = remoting || {}; On 2015/01/23 ...
5 years, 10 months ago (2015-01-28 00:26:46 UTC) #8
Jamie
https://codereview.chromium.org/868203002/diff/20001/remoting/webapp/crd/js/activation_handler.js File remoting/webapp/crd/js/activation_handler.js (right): https://codereview.chromium.org/868203002/diff/20001/remoting/webapp/crd/js/activation_handler.js#newcode6 remoting/webapp/crd/js/activation_handler.js:6: var remoting = remoting || {}; On 2015/01/28 00:26:45, ...
5 years, 10 months ago (2015-01-28 20:52:09 UTC) #9
kelvinp
Thank you very much for your feedback. I like the code much better now. PTAL ...
5 years, 10 months ago (2015-01-29 01:05:35 UTC) #10
Jamie
LGTM! https://codereview.chromium.org/868203002/diff/60001/remoting/webapp/base/js/auth_dialog.js File remoting/webapp/base/js/auth_dialog.js (right): https://codereview.chromium.org/868203002/diff/60001/remoting/webapp/base/js/auth_dialog.js#newcode31 remoting/webapp/base/js/auth_dialog.js:31: this.borderElement_ = rootElement.querySelector('#auth-dialog-border'); On 2015/01/29 01:05:34, kelvinp wrote: ...
5 years, 10 months ago (2015-01-29 01:52:34 UTC) #11
kelvinp
FYI https://codereview.chromium.org/868203002/diff/80001/remoting/webapp/crd/js/crd_event_handlers.js File remoting/webapp/crd/js/crd_event_handlers.js (right): https://codereview.chromium.org/868203002/diff/80001/remoting/webapp/crd/js/crd_event_handlers.js#newcode42 remoting/webapp/crd/js/crd_event_handlers.js:42: remoting.handleAuthFailureAndRelaunch(); On 2015/01/29 01:52:34, Jamie wrote: > Now ...
5 years, 10 months ago (2015-01-29 19:40:32 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868203002/100001
5 years, 10 months ago (2015-01-29 19:41:03 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/53604) ios_rel_device_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ng/builds/5551) ios_rel_device_ninja_ng ...
5 years, 10 months ago (2015-01-29 19:44:26 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868203002/120001
5 years, 10 months ago (2015-01-29 21:34:06 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:120001)
5 years, 10 months ago (2015-01-29 22:25:01 UTC) #19
commit-bot: I haz the power
5 years, 10 months ago (2015-01-29 22:27:05 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/2589f69a7fb7be7586f075af0b9029517543ed31
Cr-Commit-Position: refs/heads/master@{#313807}

Powered by Google App Engine
This is Rietveld 408576698