How to change "localhost" to app name in Google Identity Toolkit API SMS verification?

277 Views Asked by At

I'm using the Google Identity Toolkit API on my backend to generate a reCAPTCHA sitekey using the getRecaptchaParams endpoint. I pass the recaptchaSiteKey to the front end, which is built with Vue Ionic. The front end then uses this sitekey to generate a reCAPTCHA and obtain the recaptchaToken. This token is then sent back to the backend to be used in the sendVerificationCode endpoint. However, the SMS message received by the user displays the following:

276025 is your verification code for localhost.

I would like to know how to change "localhost" to the app name. I added the domain to the Authorized Domains list in the Firebase Console and removed "localhost" from the list. However, I encountered the following error:

CAPTCHA_CHECK_FAILED : Hostname match not found
0

There are 0 best solutions below