-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Google authentication to use OAuth2 flow, and allow user to pick Google account #99
Conversation
…ck Google account.
// Client ID associated with our redirect URL from Google Developers Console. | ||
var CLIENT_ID = | ||
'746567772449-jkm5q5hjqtpq5m9htg9kn0os8qphra4d.apps.googleusercontent.com'; | ||
|
||
function AuthGoogle(credCallback, errorCallback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuthGoogle
really looks like it wants to be a typescript class :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
How was it tested? :) |
Just one question - beyond that, code is excellent :) LGTM |
// the same sandboxed environment used by chrome.identity.launchWebAuthFlow) | ||
// and would be unable to pick the right account for UProxy. | ||
// Only invoke login popup after logout has been completed (asynchronously). | ||
this.logout(launchLoginPopup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a bit better to use a promise instead of a callback for this kind of thing.
LGTM |
Change Google authentication to use OAuth2 flow, and allow user to pick Google account
* move to unbranded firefox builds
Change Google authentication to use OAuth2 flow, and allow user to pick Google account.
Tested through the UI by switching between several Google accounts. Each time we login we are always given the Google login screen so users can pick their account. This works the first time the user logs in after loading the app, and each time they login after clicking logout.