flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

🐛 [flutterfire_ui] Email Verification feature missing in Email and Password authentication flow.

Open prajwal27 opened this issue 2 years ago • 10 comments

Bug report

Describe the bug There's no feature to verify the email address from the built-in SignInScreen and RegisterScreen provided by the package. Is this work in progress or am I mistaken?

prajwal27 avatar May 27 '22 17:05 prajwal27

This was added as part of this PR https://github.com/firebase/flutterfire/pull/8358, so the feature must be there in the plugin already.

Closing for now. If you disagree, write in comments and I'll reopen it.

darshankawar avatar May 30 '22 11:05 darshankawar

@darshankawar the feature is present as a part of the Profile screen and not as part of user registration process.

Imagine a scenario where I would want the email to be verified before creating the firebase user with that email id. I don't think that's possible now. I want to eradicate usage of dummy/spam email ids

prajwal27 avatar May 31 '22 15:05 prajwal27

Thanks for the feedback. Reopening.

darshankawar avatar Jun 01 '22 04:06 darshankawar

Treating this as an enhancement.

/cc @lesnitsky

darshankawar avatar Jun 01 '22 06:06 darshankawar

Imagine a scenario where I would want the email to be verified before creating the firebase user with that email id. I don't think that's possible now.

I don't think this is possible at all given the underlying firebase auth API. @prajwal27 could you please provide an example of how would you implement such behaviour without flutterfire_ui?

lesnitsky avatar Jun 01 '22 23:06 lesnitsky

Hey @prajwal27. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jun 10 '22 01:06 google-oss-bot

The thing here is that when users sign up using the already provided EmailProviderConfiguration in FlutterFire RegisterScreen, a user account is successfully created which can be seen at the Authentication>>Users area in Firebase dashboard.

However, there's no way to confirm if the email a user signed up with is valid or not. An Email Verification link would solve this.

You could however create a solution around this. After users create an account, you could redirect them to a LandingScreen that would check whether to automatically send email verification using; "await user?.sendEmailVerification();".

A condition could be used to check if "user.emailVerified" is true or false before redirecting to specific screen.

If false, you could provide a link to resend email verification link. But if true, users would be redirected to the HomeScreen.

ogbodotg avatar Jun 10 '22 09:06 ogbodotg

Looking forward to this feature. My concern in implementing email verification is to ensure that a user does not sign up with someone else's e-mail.

I would also like the functionality not to be implemented on the profile screen, as developers can make apps without a profile screen but still have email verification.

pabloalencar avatar Jun 19 '22 04:06 pabloalencar

The thing here is that when users sign up using the already provided EmailProviderConfiguration in FlutterFire RegisterScreen, a user account is successfully created which can be seen at the Authentication>>Users area in Firebase dashboard.

However, there's no way to confirm if the email a user signed up with is valid or not. An Email Verification link would solve this.

You could however create a solution around this. After users create an account, you could redirect them to a LandingScreen that would check whether to automatically send email verification using; "await user?.sendEmailVerification();".

A condition could be used to check if "user.emailVerified" is true or false before redirecting to specific screen.

If false, you could provide a link to resend email verification link. But if true, users would be redirected to the HomeScreen.

This is a great way to ensure that users verify their email before proceeding to the actual app. But what I'm concerned is about dummy/spam email ids being used at the time of registration. There will be lots of Firebase Users created from these emails and there's no way to prevent it. @darshankawar @lesnitsky

prajwal27 avatar Jun 19 '22 04:06 prajwal27

Waiting on this feature as well, I do not want users to "steal" other peoples emails addresses, preventing email address owners fromusign their own email address.

I would clasify this as a bug, not an enhancement, I think its basic email sign in authentication flow for security.

mikejones3 avatar Aug 09 '22 20:08 mikejones3

I do also believe emailVerification should be considered as a basic flow for security. Someone could have signed up with my email and this will prevent me to signup as well.

Looking forward for this.

francescovgg avatar Aug 25 '22 14:08 francescovgg

fixed in #9343

lesnitsky avatar Oct 17 '22 14:10 lesnitsky