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

generateVerifyAndChangeEmailLink only works for accounts with existing email #2826

Open
vandres opened this issue Jan 6, 2025 · 0 comments

Comments

@vandres
Copy link

vandres commented Jan 6, 2025

  • Operating System version: Firebase Cloud
  • Firebase SDK version: 12.6.0
  • Firebase Product: auth
  • Node.js version: 20
  • NPM version: 10

Steps to reproduce:

In our app, we allow social login with Facebook (and more, but irrelevant). When authenticating with Facebook, the user can decide to not provide his email address. Since our whole application builds arounds mails, we ask them to provide one.

We activated email enumeration protection recently!

Since we can no longer set that mail in the frontend code and we want styled/custom mails, we would like to use generateVerifyAndChangeEmailLink in the admin library. But it seems impossible to call that function, if we don't provide an existing email.

This is, how the user looks in Firebase Console

Image

Relevant Code:

// I tried different things for the existing mail, but all failed
await getAuth().generateVerifyAndChangeEmailLink('-', email, actionCodeSettings);
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