Home > OS >  URL generated by generateEmailVerificationLink()
URL generated by generateEmailVerificationLink()

Time:06-16

Is there a way to configure the generateEmailVerificationLink() to generate different URLs for different environments?
https://firebase.google.com/docs/auth/admin/email-action-links

It looks like the only way is to configure it in the Firebase Console by following the steps below.
Authentication > Templates > customize action URL
This only allows me to set one URL per Firebase project.
However, when run from localhost, I want the link to be generated with the localhost domain.

CodePudding user response:

You cannot set that URL based on any environment. You can however set the redirect URL to localhost in actionCodeSettings so you are redirected back to your local site after the link is used.

  • Related