Firebase passwordless authentication by modifying the emailVerified property?

时间:2016-07-11 22:44:10

标签: ios firebase firebase-authentication

I am using Firebase's email + password Auth system.

I have a use case(passwordless auth) where I'd like to verify the user's email a second time.
So assuming they already had their email verified once, I'd like to:

  • Send them another "verify your email" Email, i think this would work by simply calling sendEmailVerificationWithCompletion(..)

  • After they verify their email a second time, Determine that they did. The first time I can check the emailVerified Boolean, but is there a way to reset this emailVerified Boolean to False and check it a second time?

How can I achieve this?

[Edited]

More description if it helps:

Im trying to do Passwordless Authentication. Maybe this is not possible on Firebase and I'd have to use something like auth0

I have only 2 flows.

Flow 1: Sign Up

  • Input an email and username (Display name in firebase).

  • Verify your email.

  • Now you stay signed in until the app is deleted from the phone ( a default password is used to sign you in and sign you out on app open and app exit respectively)

Flow 2: Login

  • This flow becomes relevant if you have an account with the App, but you deleted it in the past and reinstalled again

  • Input your email/username

  • if you have an account, you'll get an email to "verify that it is you again"

  • Verified? Now you stay signed in until the app is deleted from the phone ( a default password is used to sign you in and sign you out on app open and app exit respectively)

1 个答案:

答案 0 :(得分:1)

我不认为在Firebase中可以使用真正的无密码电子邮件身份验证系统。我会用Auth0来做这件事