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

Support verifyBeforeUpdateEmail in the Auth Emulator #6748

Closed
ghinda opened this issue Feb 7, 2024 · 2 comments
Closed

Support verifyBeforeUpdateEmail in the Auth Emulator #6748

ghinda opened this issue Feb 7, 2024 · 2 comments

Comments

@ghinda
Copy link

ghinda commented Feb 7, 2024

[REQUIRED] Environment info

firebase-tools: 13.2.0
firebase: 10.8.0

Platform: Arch

[REQUIRED] Test case

createUserWithEmailAndPassword(auth, 'test@email.com', 'testing')
verifyBeforeUpdateEmail(currentUser, 'test1@email.com')
curl http://localhost:9099/emulator/v1/projects/project-test/oobCodes

[REQUIRED] Steps to reproduce

Change the email address of an existing Firebase Auth user, using verifyBeforeUpdateEmail instead of updateEmail.

[REQUIRED] Expected behavior

The method should generate an oob code and show the url in the Emulator logs. It should also be available in the list of generated oob codes at http://localhost:9099/emulator/v1/projects/project-test/oobCodes.

Now that Email Enumeration Protection is enabled by default for new projects, and the updateEmail method is marked as deprecated (and requires switching to verifyBeforeUpdateEmail), we should have support for verifyBeforeUpdateEmail in the emulator.

[REQUIRED] Actual behavior

Throws an 501 (Not Implemented) error because of missing Firebase Auth REST API for accounts:sendOobCode in the emulator.

POST http://localhost:9099/identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=123 501 (Not Implemented)
@aalej
Copy link
Contributor

aalej commented Feb 7, 2024

Hey @ghinda, thanks for the detailed report. The Auth emulator currently does not support this feature yet. We do understand its importance since new projects have Email Enumeration Protection enabled by default. However, we won't be able to provide a detailed timeline as to when this feature would be implemented.

@ghinda
Copy link
Author

ghinda commented May 17, 2024

Closing this as a duplicate of #3424

@ghinda ghinda closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants