Firebase Authentication Template > Password Reset > getting html tags as it is, not html formatted content

Viewed 369

I have 2 firebase project, working separately. I have modified password reset templates in both few week back. I noticed now, one is sending mail with proper html formatted content, while other sending html tag as it is.

I copied 1st template to 2nd project still 2nd one sending html content as it is.

appreciated if someone can help me. (I am using my own SMTP in both).

1st project sends like - Hello Deepak,

2nd project sends like - <p>Hello Deepak,</p>

though template looks like - <p>Hello %DISPLAY_NAME%,</p>

2 Answers

FIREBASE/MAILGUN HTML SETTINGS

I've finally worked it out and hope it can help somebody:

  1. Go to https://developers.google.com/oauthplayground
  2. Under "Step 1", select "Firebase Dynamic Links API v1" as the scope
  3. Click "Authorize APIs" and log into the Google Account assocaited with your Firebase App
  4. Under "Step 2", click "Exchange authorization code for tokens"
  5. Under "Step 3", change HTTP method to PATCH
  6. Enter the Request URI https://identitytoolkit.googleapis.com/admin/v2/projects/*{FIREBASE_PRODJECT_ID}*/config?updateMask=notification.sendEmail.resetPasswordTemplate.bodyFormat (Add your project ID in there!)
  7. Click "Enter request body" and input {notification:{sendEmail:{resetPasswordTemplate:{bodyFormat: "HTML"}}}} and click "Close" at the bottom.
  8. Click "Send the request"

If you get HTTP/1.1 200 OK within the response, job done. You can now send HTML emails using Firebase using Mailgun!

Related