27
votes

I'm using firebase auth in my app and i'm setting up password-less email sign up.

I have managed to set the email from my own domain but how do i change the text sent in the email for magic link? I can see the configuration for the other template emails but not this one.

The email in question is this one:

Hello,

We received a request to sign in to teamname using this email address. If you want to sign in with your youremail account, click this link: link

If you did not request this link, you can safely ignore this email.

Thanks,
3

3 Answers

48
votes

There is no way to edit the email template. The reason for this is that this allows bad actors to use Firebase to spam people, which would put the service at risk.

To control what message gets sent, you'll have to send it yourself and handle the verification flow with a custom email action handler. See How to modify Email Confirmation message - Firebase.

You could also take full control of the verification flow, and then use the Admin SDK to set the emailVerified flag of the user's profile.

5
votes

Following on from Frank's answer, you will have to create your own email action link using the Firebase Admin SDK and then put that link in your custom email which you will then send using whatever service (Sendgrid, Mailgun, etc.).

See how to create the action link here: Generating Email Action Links

2
votes

the only way to customize your email body is to install firebase extension called Trigger Email but it'll put you on the Blaze plan because it makes requests to third-party APIs, and as they specified on the extension's page you'll only be charged for usage that exceeds Firebase's free tier.