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

Email Link Sign In Configuration #126

Open
beebox opened this issue Feb 5, 2021 · 1 comment
Open

Email Link Sign In Configuration #126

beebox opened this issue Feb 5, 2021 · 1 comment

Comments

@beebox
Copy link

beebox commented Feb 5, 2021

I'm getting a 404 when trying to test email link sign in on localhost. I've followed the advice in #88 and tried changing SignInFlow to redirect.

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

Is there any further configuration needed to get email link sign in working?

Thank you for any advice

@artyom-ivanov
Copy link

After this fix all working for me. My config:

const uiConfig = {
  signInFlow: firebase.auth().isSignInWithEmailLink(window.location.href) ? 'redirect' : 'popup',
  signInOptions: [
    firebase.auth.GoogleAuthProvider.PROVIDER_ID,
    {
      provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
      signInMethod: firebase.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD
    },
    {
      provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
      defaultCountry: 'RU',
      whitelistedCountries: ['RU', '+7']
    },
    'anonymous'
  ],
  callbacks: {
    // Avoid redirects after sign-in.
    signInSuccessWithAuthResult: () => false,
  },
};

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

2 participants