Skip to content

Return tokens on successful sign in with an IDP #362

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

Merged
merged 5 commits into from
Oct 19, 2016

Conversation

amandle
Copy link
Contributor

@amandle amandle commented Oct 17, 2016

This exposes the IdpResponse object to the user. It can be retrieved from the result intent received in onActivityResult using IdpResponse.fromResultIntent(data). Resolves #286.

Copy link
Contributor

@samtstern samtstern left a comment

Choose a reason for hiding this comment

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

LGTM. I left one comment on IdpResponse but since that API already existed (the file was just renamed) it's not too important.

/**
* Get the email used to sign in.
*/
public String getEmail() {
Copy link
Contributor

Choose a reason for hiding this comment

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

NonNull? Also is there any case this would not be FirebaseAuth.getInstance().getCurrentUser().getEmail()? Would prefer not to duplicate if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's actually nullable (because Twitter always has to be special). We need to record the email on the IdpResponse because we can be in the state where the user has signed in to the IDP but were unable to sign in to Firebase and we need to know the email to to find the existing account to link.

@amandle amandle merged commit 068899c into firebase:version-1.0.0-dev Oct 19, 2016
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.

2 participants