Firebase authentication email customisation

前端 未结 4 1738
孤独总比滥情好
孤独总比滥情好 2020-12-15 06:09

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

相关标签:
4条回答
  • 2020-12-15 06:55

    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

    0 讨论(0)
  • 2020-12-15 07:00

    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.

    0 讨论(0)
  • 2020-12-15 07:01

    The answer mentioned above that it is not editable is true. But we know that, for company logo in the mail is a very important thing. So this becomes crucial.

    So the answer is yes. You can have custom email template. You have to send mail through your service and you have to handle the custom action url

    See this example: https://laravelwithfirebase.blogspot.com/2020/04/chapter-13-implement-custom-firebase-auth-email-verification-template-replace-default-view-using-laravel-php.html

    0 讨论(0)
  • 2020-12-15 07:06

    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.

    0 讨论(0)
提交回复
热议问题