74

in console firebase, in the menu Authentification -> Templates

There is a sms verification template :

%LOGIN_CODE% is your verification code.

How to change this message template?

3

5 Answers 5

62

firebaser here

Neither the email verification template nor the SMS verification template can be modified. You can select the language from the Firebase console, however this is a per project setting and you can't modify the templates.

We understand that changing the template would allow you to tweak the user-experience of your app, but we don't allow this to prevent abuse of the service.

1
  • 1
    Moderator note: comments are not the place to ask a developer for a feature request. Comments are meant to for ask for clarification or to point out problems in the post. Anything else will be removed.
    – Martijn Pieters
    Aug 27, 2020 at 20:23
53

Update 1 year later, still a no go, but I received this back from support

The Firebase SMS Authentication message content will depend on the platform you are requesting that message from. Here is a list of the possible variations you may get:

  • iOS and Android - The SMS messages draw the app's name from the App Store / Play Store. One an app is published, the correct name
    should start appearing. There may be a small delay (a week or two at
    most).
  • Web - It will always use the domain that the SMS is requested from. To modify it, you can setup a custom domain.
  • iOS (using Recaptcha) - Phone authentication on iOS will show the project's url instead of the app's name in the verification SMS when using the reCAPTCHA flow. This is expected behavior. The reCAPTCHA flow was added for cases where an APNS token is not available (including on real devices). If APNS is not correctly configured, a real device will default to the reCAPTCHA flow.

Unfortunately, neither the email verification template nor the SMS verification template can be modified. You can select the language from the Firebase Console, however this is a per project setting and you can't modify the templates.

We understand that changing the template would allow you to tweak the user-experience of your app, but we don't allow this to prevent abuse of the service. I hope this clears your consults about this topic. If you happen to have any more questions, please, do not hesitate to write back!

1
  • 1
    How do you opt out of using the reCaptcha? I cant have my firebase url exposed in the first text a user gets!? Google what are you thinking!?
    – Learn2Code
    May 8, 2021 at 1:32
5

Meanwhile you cannot change the content of the message, you can change the app's URL mentioned in the SMS.

  1. Go to Authentication > Sign-in Method > Authorized domains and add your own domain website.tld

  2. Now edit the Firebase config object (in your source code) and update the authDomain key to the domain you linked earlier.

Send a new test message, you're good to go.

2
  • where to find the authDomain key?
    – Soorya
    Jan 24, 2021 at 14:52
  • @soorya within the app you’re developing. Somehwre in there you have copied the firebase config, which also contains the authDomain key.
    – Eduard
    Jan 25, 2021 at 15:40
2

As per Firebase Support the %APP_NAME% should be shown in your firebase settings wherein the %APP_NAME% is called after Public-facing name in public settings.

EDIT:

I checked first where is the location of "localhost" and wherein i found on "Authentication>Sign-in method" then under 'authorized domain' you will find "localhost" in order to change the localhost you need to add a new domain.

Note: be careful on deleting localhost to your authorized domain. It will take time to function OTP request.

0

This one helps; Go to Authentication > Sign-in Method > Authorized domains and add your own domain website.tld

Now edit the Firebase config object (in your source code) and update the authDomain key to the domain you linked earlier.

1
  • In official firebase documents, they have not mentioned changing SMS templates, so this is not possible to change. Aug 24, 2021 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.