0
votes

I am developing an application using Angular and AngularFire. When A user is registering using email and password and the user is getting an verification email in his email. When I am changing that Action URL in Email address verification template to "http://localhost:4200/verify-email-address" then the user's email verified is still false, if I use the default URL then it is returning true. How can I set a custom Local template to show a user that his/her email is verified and redirect that user to login again.

2

2 Answers

4
votes

Customizing the email action handling requires more than just changing the URL. You're essentially taking over everything that Firebase normally does, and will need to call the relevant Firebase API (e.g. auth.applyActionCode(actionCode) to verify the email address) in various places during this processing.

The full process is described in the Firebase documentation here. You'll typically want to copy the HTML + script from that page, get it working, and only make any customizations after that.

0
votes

For anyone who might want to do the above, we have just added a custom domain on Firebase Hosting, which means we can use that for the <our-domain)/__/auth/action and then just change the templates to use the custom domain.

Odd that this is not documented, but adding the custom domain to Firebase Hosting replaces everything in the project (e.g. this method is mentioned on Dynamic Links docs)