Skip to content
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

Merged
merged 3 commits into from
Apr 30, 2014

Conversation

dborkan
Copy link
Contributor

@dborkan dborkan commented Apr 29, 2014

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.

// Client ID associated with our redirect URL from Google Developers Console.
var CLIENT_ID =
'746567772449-jkm5q5hjqtpq5m9htg9kn0os8qphra4d.apps.googleusercontent.com';

function AuthGoogle(credCallback, errorCallback) {
Copy link
Collaborator

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 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@iislucas
Copy link
Contributor

How was it tested? :)

@keroserene
Copy link
Collaborator

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);
Copy link
Contributor

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.

@iislucas
Copy link
Contributor

LGTM

dborkan added a commit that referenced this pull request Apr 30, 2014
Change Google authentication to use OAuth2 flow, and allow user to pick Google account
@dborkan dborkan merged commit fc24ebb into dev Apr 30, 2014
trevj added a commit that referenced this pull request Dec 7, 2016
* move to unbranded firefox builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants