Dabbel
Dabbel

Reputation: 2825

Replace Firebase Project Name with Custom Domain in Email Templates with Action URL

Background

Firebase Authentication sends out emails for registration, password change etc. These emails contain links with the internal Firebase name of my project.

Problem

I want to replace that internal name with my custom domain, which seems to be possible by changing the Action URL and using a Dynamic Link.

I do not want to handle the email actions with my own code, but just replace the Firebase domain with a custom domain. It is about sending emails that are containing links with a custom domain and thus look nice.

Existing Answer

An answer exists, but I do not understand how this exactly works. And I am not able to comment as my reputation is too low.

https://stackoverflow.com/questions/46972194/how-to-customize-firebase-action-url-for-password-reset-and-email-verification#:~:text=You%20just%20need%20to%20create,Dynamic%20Link%20and%20hit%20done.

Illustration

Customizing the action URL

Upvotes: 4

Views: 2690

Answers (2)

Dabbel
Dabbel

Reputation: 2825

It is possible change the Firebase action URL in email templates to one's custom domain without implementing email action handler code but relying on the already existing firebase functionality.

In the Firebase Console:

  1. Go to Dynamic Links

  2. Add URL Prefix by entering your custom domain YOURDOMAIN.com. No need to actually add a Dynamic Link, this entry alone is sufficient.

  3. Go to Authentication > Template > Edit (Pencil) > Customize Action URL

  4. Enter your custom domain according to this pattern (note the TWO underscores):

https://YOURDOMAIN.com/__/auth/action

  1. Send out an email by registering to your App and click the link in the email. The link will bring you to the default Firebase page handling the action.

Upvotes: 7

Methkal Khalawi
Methkal Khalawi

Reputation: 2477

The procedure is very well explained in this documentaion. you have to:

1- create the email action handler page

2- link that page to your email template in the customize action url

Upvotes: 0

Related Questions