Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase authentication email customisation

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, 
like image 594
Reedy Avatar asked Apr 28 '18 10:04

Reedy


People also ask

How do I customize my Firebase verification email?

To customize your Firebase project's email action handler, you must create and host a web page that uses the Firebase JavaScript SDK to verify the request's validity and complete the request. Then, you must customize your Firebase project's email templates to link to your custom action handler.

Can you change email in Firebase Auth?

FOR FIREBASE V9 (modular) USERS: if any others trying this code please don't forget to re-login (firebase needs recent login token) firebase user. then only firebase will allow to change email address.

Does Firebase use JWT?

The custom JWT returned from your server can then be used by a client device to authenticate with Firebase (iOS+, Android, web). Once authenticated, this identity will be used when accessing other Firebase services, such as the Firebase Realtime Database and Cloud Storage.


1 Answers

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.

like image 159
Frank van Puffelen Avatar answered Sep 18 '22 03:09

Frank van Puffelen