-
Notifications
You must be signed in to change notification settings - Fork 211
Firebase Blocking Auth Functions Run Incorrectly on Failed Signup #1558
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
Labels
Comments
I found a few problems with this issue:
|
I reported this to Google Support, Firebase Support and our Account Management In Feb 2024. The issue was passed on to a product team and we didn't hear back. |
Hi @lox, Thanks for reporting this issue! We’ve received it and are reviewing it. We’ll provide updates as soon as possible. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[REQUIRED] Version info
node: n/a
firebase-functions: n/a
firebase-tools: n/a
firebase-admin: n/a
[REQUIRED] Test case
Firebase Blocking Auth functions
beforeUserCreated
andbeforeUserSignedIn
fire incorrectly when the a user that already exists in Firebase Auth attempts to register.Function:
registerUser.js:
When
registerUser.js
is called multiple times, thebeforeSignedIn
andbeforeUserCreated
functions will fire. After the first time for the correct user creation, they will STILL FIRE, and provide random / nonexistent uid's.This means any code that makes the assumption that these functions will only fire on authenticated sign-ins or post user-creation can potentially be exploited.
[REQUIRED] Steps to reproduce
Firebase: Error (auth/email-already-in-use).
[REQUIRED] Expected behavior
I'd expect the functions fire as described in the documentation:
Before the user is created: Triggers before a new user is saved to the Firebase Authentication database, and before a token is returned to your client app.
Before the user is signed in: Triggers after a user's credentials are verified, but before Firebase Authentication returns an ID token to your client app. If your app uses multi-factor authentication, the function triggers after the user verifies their second factor. Note that creating a new user also triggers both these events.
[REQUIRED] Actual behavior
Blocking functions fire despite the error
Firebase: Error (auth/email-already-in-use).
The text was updated successfully, but these errors were encountered: