Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I modify the template used for Firebase's email link-based authentication?

I'm walking through the steps described here and upon sending the verification email to myself, I get an email in my inbox from [email protected].

For other email-based auth steps, I can customize the sender name and email address directly from the Firebase console:

enter image description here

Am I missing something that could help me with Email Link sign-in or do I need to go through the process of modifying the SMTP settings in my app's console?

like image 838
imjared Avatar asked Nov 08 '22 04:11

imjared


1 Answers

I noticed the same behavior / restriction in the Firebase console. Considering that the underlying .firebase.auth().createUserWithEmailAndPassword method could write your new user to firestore, i guess you could use firebase function to trigger a custom email via sendGrid, for example, and you could flesh out a custom workflow from there.

This article, Email via Firebase Firestore Cloud Function Triggers includes the code to trigger custom emails and could be adapted to your needs. I imagine the trick will be to get the .emailValidated property set to true. It may be as easy as switching the boolean - i don't know.

All in all, it seems like a lot of work just to get a customized validation email though. I would recommend you just stick with what they provide.

like image 175
Ronnie Royston Avatar answered Nov 12 '22 22:11

Ronnie Royston