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

EmailLinkSignIn - retrieve email used #88

Open
scotty595 opened this issue Apr 14, 2020 · 6 comments
Open

EmailLinkSignIn - retrieve email used #88

scotty595 opened this issue Apr 14, 2020 · 6 comments

Comments

@scotty595
Copy link

Is there any way to retrieve the email used to send an email link without implementing a custom function/implementation of the firebaseui react?

i.e. it'd be great to have something similar to the below in the umailLinkSignIn callback:

emailLinkSignIn: function(email) {
   window.localStorage.setItem('emailForSignIn', email)
}

so we can avoid reprompting for the email.

@bojeil-google
Copy link
Contributor

When the link is opened on the same device, we do not prompt the user to provide it again. We already cache the email locally in those flows.

@scotty595
Copy link
Author

perfect, once I changed the signInFlow from 'popup' to 'redirect' it started automatically logging in with the correct email address - thanks.

Still seems to be relevant if you have is set as popup signInFlow though.

have used the below in uiConfig as a workaround:

signInFlow: firebase.auth().isSignInWithEmailLink(window.location.href) ? 'redirect' : 'popup',

@bojeil-google
Copy link
Contributor

I don't think signInFlow should affect this. signInFlow affects sign-in with IdPs like Google, Facebook, Twitter, etc with popup or redirect.

@michaeldoaty
Copy link

I'm seeing the same behavior. Changing signInFlow from popup to redirect fixed the issue.

@niklaslavrell
Copy link

I'm having the same (I think) issue. When using email link authentication and pressing the link in the email, the user won't get logged in when I have signInFlow set to popup. However if signInFlow is set to redirect , it works fine.

@jmn
Copy link

jmn commented Sep 21, 2020

I had the same problem and it took quite a while to figure out. Setting signInFlow to redirect makes passwordless e-mail sign in work.

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

No branches or pull requests

5 participants