quickstart-js icon indicating copy to clipboard operation
quickstart-js copied to clipboard

auth/captcha-check-failed and "Hostname match not found" errror

Open meet0929 opened this issue 5 years ago • 24 comments

When trying with authentication with signInWithPhoneNumber and https://github.com/firebase/quickstart-js/blob/master/auth/phone-visible.html uploading code on the server gave an error and working fine on localhost

Added the domain under the Authorized domain Firebase Console ?? Authentication ?? Sign-in-method ?? Authorized Domains.

meet0929 avatar Dec 04 '19 19:12 meet0929

@meet0929 as a sanity check, can you please double check that you whitelisted the domain in the same project that your app is using for its config? The fact that things work fine on localhost but not on the server suggests that this is probably a whitelisting issue.

jhuleatt avatar Dec 12 '19 22:12 jhuleatt

@jhuleatt I added my domain in the Authorized Domain like if my domain https://www.xyz.com/ i added xyz.com but it's not working

meet0929 avatar Feb 11 '20 07:02 meet0929

This error may occur when you host your app in no ssl certified domain. Then you have to whitelist your domain in firebase console.

Go to Firebase Console -> Authentication -> sign-in-method -> Authorized Domains and add your domain.

By default localhost and any https:// domain is whitelisted.

blaze021 avatar Aug 14 '20 04:08 blaze021

I am having this issue

stepanovaky avatar Dec 01 '20 05:12 stepanovaky

I am having this issue

Add your domain in the list

meet0929 avatar Dec 01 '20 05:12 meet0929

I have, it doesn't resolve the issue

stepanovaky avatar Dec 01 '20 05:12 stepanovaky

I have, it doesn't resolve the issue

May I know the url you are using as a dummy text but in same format

meet0929 avatar Dec 01 '20 06:12 meet0929

@jhuleatt I added my domain in the Authorized Domain like if my domain https://www.xyz.com/ i added xyz.com but it's not working

Add with www.xyz.com

meet0929 avatar Dec 01 '20 06:12 meet0929

I have, it doesn't resolve the issue

@stepanovaky can you post the console log so that we can recreate the issue.

blaze021 avatar Dec 01 '20 12:12 blaze021

@blaze021 Fixed it, turns out @meet0929 was correct, and my mistake was not to add a www in front of the domain. Thank you both for your help!

stepanovaky avatar Dec 01 '20 12:12 stepanovaky

i faced the same issue and not solve this given solution

DebashishPaul avatar Jul 29 '21 09:07 DebashishPaul

i faced the same issue and not solve this given solution

have you white listed your domain. can you paste your domain in sample format

meet0929 avatar Jul 29 '21 09:07 meet0929

yes working by adding domain name in firebase: Firebase > Authentication > Sign In Method > Scroll Down > Authorized domains > Add Domain Name like testadd.com > refresh web page and its work. Note : It also working for multisite network ( for multisite also the same method no need to add subdomains)

Zaabi79 avatar Aug 26 '21 07:08 Zaabi79

Please add your domain with 'www' and without 'www'. i.e. your URL is https://www.mydomain.com - Then add as below

  • www.mydomain.com
  • mydomain.com

It's working for me.

hiteshemedstore avatar Oct 29 '21 13:10 hiteshemedstore

if you are testing in your localhost please add the 127.0.0.1 in Authorized domains list

Aashishkumar123 avatar Mar 09 '22 16:03 Aashishkumar123

I have this error on React Native with Expo. What kind of domain I should have to specify?

giacomoalonzi avatar May 05 '22 15:05 giacomoalonzi

I have added my domain and it goes like https://xyz.com but it doesn't solve the issue

Supritha0203 avatar Jul 21 '22 14:07 Supritha0203

This error may occur when you host your app in no ssl certified domain. Then you have to whitelist your domain in firebase console.

Go to Firebase Console -> Authentication -> sign-in-method -> Authorized Domains and add your domain.

By default localhost and any https:// domain is whitelisted.

It's working for me.

rizkianakbar avatar Sep 23 '22 02:09 rizkianakbar

can i add my server address at the place of domain like 13.233.xx.xxx

Vishnu-yes-i-am avatar Oct 28 '22 11:10 Vishnu-yes-i-am

if you are testing in your localhost please add the 127.0.0.1 in Authorized domains list

This worked a big thanks for this.

adi3120 avatar Nov 25 '22 05:11 adi3120

Update: Authorized Domains is under Settings sections Go to Firebase Console -> Authentication -> sign-in-method -> Settings -> Authorized Domains and add your domain.

mohanm18 avatar Apr 24 '23 18:04 mohanm18

I have deployed my CRA on the Vercel and added the domain to whitelist but still getting the same error, don't know what todo!

zubaidrasool007 avatar Jun 05 '23 14:06 zubaidrasool007

New Firebase Layout is a bit different

Go to "Authentication" -> "Settings" -> "Authorized domains"

And then just add it there

dupiesdupreez avatar Nov 29 '23 13:11 dupiesdupreez

you should add your website domain inside firebase Authorized domains this will solve the problem

sanajani avatar Jan 09 '24 20:01 sanajani