Identity Platform Custom Email Template Links Use firebaseapp.com Domain

Howdy,

I am using Google Cloud Identity Platform's Email/Password provider, and I would like the links in the password reset emails to use my custom domain.

I have configured the custom domain in Identity Platform, and the templates use the correct email addresses for the custom domain, but there is no "customize action URL" option in the Identity Platform section of the Google Cloud console.

I was able to find my corresponding Firebase project in the Firebase console (e.g. , and when I try to do so in the Firebase console, and find the "customize action URL", but I'm unable to edit it (it's greyed out), presumably because this is an Identity Platform project, but who knows...

The default email looks a bit like a phishing attempt, so I can't be the only one wanting to make the link's domain match the email from and reply-to domain.  I will try to do so programmatically with the REST API, but if someone has already figured this out, or knows of a a "click ops" friendly way,  I'd be grateful to know. 

Thanks!

-Tim

Solved Solved
0 1 1,349
1 ACCEPTED SOLUTION

Hah! I should have tried that first. REST API worked like a champ.

Getting the current config:

curl \
  'https://identitytoolkit.googleapis.com/v2/projects/[YOUR_PROJECT]/config?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed

Updating it with a new link:

curl --request PATCH \
  'https://identitytoolkit.googleapis.com/v2/projects/[YOUR_PROJECT]/config?updateMask=notification.sendEmail.callbackUri&key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"notification":{"sendEmail":{"callbackUri":"https://[YOUR_CUSTOM_DOMAIN]/__/auth/action"}}}' \
  --compressed

 

Caveat your custom domain needs to already be configured to handle the auth callback. 

Feature request to enable this functionality in the GCP console at https://console.cloud.google.com/customer-identity/provider;name=email under "Configure Templates".

 

 

 

View solution in original post

1 REPLY 1

Hah! I should have tried that first. REST API worked like a champ.

Getting the current config:

curl \
  'https://identitytoolkit.googleapis.com/v2/projects/[YOUR_PROJECT]/config?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed

Updating it with a new link:

curl --request PATCH \
  'https://identitytoolkit.googleapis.com/v2/projects/[YOUR_PROJECT]/config?updateMask=notification.sendEmail.callbackUri&key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"notification":{"sendEmail":{"callbackUri":"https://[YOUR_CUSTOM_DOMAIN]/__/auth/action"}}}' \
  --compressed

 

Caveat your custom domain needs to already be configured to handle the auth callback. 

Feature request to enable this functionality in the GCP console at https://console.cloud.google.com/customer-identity/provider;name=email under "Configure Templates".

 

 

 

Top Labels in this Space