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

[firebase_auth: ^5.3.4]: verifyBeforeUpdateEmail(newEmail) isn't checking whether newEmail is already registered. #16907

Open
1 task done
Kamran73 opened this issue Dec 24, 2024 · 3 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: android Issues / PRs which are specifically for Android. plugin: auth type: bug Something isn't working

Comments

@Kamran73
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

No response

Description

Firebase_auth introduced a new function {verifyBeforeUpdateEmail(newEmail)} for updating email.

issue: if new email Is already used/registered, verifyBeforeUpdateEmail(newEmail) doesn't throw any exception but returns with a success response with no verification link sent to new email address.

  • I tried it with firebase emulator and it works fine, it throws exception that "Email already used, go to login".

Reproducing the issue

package:
firebase_auth: ^5.3.4

  1. register a user with any email e.g [email protected] ----> 1st user

  2. register and login another user with new email e.g [email protected] ---- 2nd user

  3. try to update 2nd user email using FirebaseAuth.instance.currentUser.verifyBeforeUpdateEmail('[email protected]');

expected response: exception ('email already used go to login')
actual response: success but no link sent to '[email protected]'

Firebase Core version

3.8.1

Flutter Version

3.24.0

Relevant Log Output

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

@Kamran73 Kamran73 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Dec 24, 2024
@SelaseKay
Copy link
Contributor

Hi @Kamran73, thanks for the report. However, I'm unable to reproduce this issue on android and iOS. Could you provide a sample minimal code reproducing this issue? Also, what platform(iOS, android, web, etc) are you experiencing this issue on?

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Dec 24, 2024
@Kamran73
Copy link
Author

@SelaseKay I provided a sample code above, but I am pasting it again. This is just one line of code to reproduce the issue.

Platform I am testing on is Android.

code:
await FirebaseAuth.instance.currentUser!.verifyBeforeUpdateEmail('[email protected]');

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Dec 26, 2024
@SelaseKay
Copy link
Contributor

Hi @Kamran73, I'm unable to reproduce this issue. It seems to work as expected on my end. Could you provide a complete minimal repository reproducing this issue?

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: android Issues / PRs which are specifically for Android. and removed Needs Attention This issue needs maintainer attention. labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: android Issues / PRs which are specifically for Android. plugin: auth type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants