1

We use GCP Identity Platform to manage multi-tenant authentication with email and password provider.

Google provides a way to configure email templates that are sent when user requests a password reset (in our case, this flow is triggered on the fronted by calling https://firebase.google.com/docs/reference/js/v8/firebase.auth.Auth#sendpasswordresetemail). This will trigger a email send to the user for which identity this method was called. This email, however, is problematic for us: it is sent from the *.firebaseapp.com domain (we want to use our own domain) and since it's been setup initially, it is now not possible to amend body of the email sent or change the "from" email used to send it.

This is how the configuration looks like in GCP console: Identity console

Anyone experienced the same issues or know what is the proper procedure to update email templates?

agulowaty
  • 191
  • 7
  • I might be wrong but I think you will need a Google Workspace account to use your own domain. – John Hanley May 11 '22 at 20:17
  • I can set my own domain there, I added all relevant fields, but issue is whatever changes I made to this form, they are not applied. Template body is not changed and emails are being sent from the old domain. – agulowaty May 12 '22 at 08:35
  • This answer also described an elegant solution: https://stackoverflow.com/a/70931230/3939280 – Sytze Aug 16 '22 at 14:11

1 Answers1

1

Answering my own question.

After some research, I started to believe GCP Console doesn't offer a way to make email templates configured at parent/top level project and inherit these settings by tenant providers. It is possible, however, with direct API calls:

Using patch https://cloud.google.com/identity-platform/docs/reference/rest/v2/projects.tenants/patch

one needs to update Tenant entity with Inheritance object (setting emailSendingConfig flag) :

 {
  "name": "projects/<project-id>/tenants/<tenant-id>",
  "displayName": "<your tenant>",
  "allowPasswordSignup": true,
  "inheritance": {
   "emailSendingConfig": true
  }
}
agulowaty
  • 191
  • 7
  • Thanks a lot for answering your own question. I had no idea why I was not seeing the changes I made to templates until I found this. – memoalv Aug 31 '22 at 02:58