[firebase_auth: ^5.3.4]: verifyBeforeUpdateEmail(newEmail) isn't checking whether newEmail is already registered. #16907
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
Is there an existing issue for this?
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.
Reproducing the issue
package:
firebase_auth: ^5.3.4
register a user with any email e.g [email protected] ----> 1st user
register and login another user with new email e.g [email protected] ---- 2nd user
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
snippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: