Search code examples
javascriptfirebasefirebase-authenticationangularfire

Firebase User verify Email Action URL to Custom URL


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.


Solution

  • 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.