6
votes

I'm new to firebase and I Want to know how to customize action URL for the password reset and email verification mail.

For Example https://app.firebaseapp.com/__/auth/action // here I Don't want firebaseApp.com. So how to do I Customize this action URL from firebase.? Please help me as I am new to firebase. any help would be appreciated

6

6 Answers

2
votes

You may refer to the "Customize the sender domain" section in the Firebase support article https://support.google.com/firebase/answer/7000714?hl=en

8
votes

if you want to change or customize default action firebase URL: https://app.firebaseapp.com to https://your_domain.com.

You just need to create a Firebase Dynamic link of your custom domain or part of your website and you're done. After Creating Firebase Dynamic Link, go to Authentication/Templates on Firebase, and click on Customize URL of your action link and type your Dynamic Link and hit done. Your Default Action URL link has been changed.

More information please visit https://firebase.google.com.

7
votes

I know it's an year old question now, but this is the correct answer. Custom Email Handler Docs. Simply customizing that URL wont help as it's just half of the work.

1
votes

I believe i've found a way to accomplish this without the need to create your own webpage.

First go to your Firebase Console and then Firebase Hosting. Create a unique subdomain like verify.yourdomain.com or app.yourdomain.com. Redirect that domain to your project's default domain.

verify.yourdomain.com redirects to default-1234.firebaseapp.com.

Once Firebase verifies your subdomain after some time, it should be labeled as connected. Then within the console go to Authentication and then Templates. Replace the default domain within the action handler to your new subdomain.

https://verify.yourdomain.com/__/auth/action.

That should be it.

0
votes

If you utilize a DNS registrar that supports synthetic records ( e.g. Google Domains) you can do this simply with a synthetic record that supports SSL and path forwarding.

0
votes

I don't know if there is any drawbacks with this (it's working for me), but the simplest way, if you are already using a custom domain in your app, is to just change the domain in the custom URL in the email template.

For example, just change https://myapp.firebaseapp.com/__/auth/action to https://myapp.com/__/auth/action in the template configuration, considering that you have already configured myapp.com to be your custom domain in firebase hosting.

No need for dynamic links, redirects or even to create a subdomain in your DNS!