Firebase: This domain is not authorized

in firebase console Auth --> Authorised domains

enter image description here


must equal (in Google cloud console -- > API & Services --> credentials ) :

enter image description here


must equal (in api config) :

enter image description here


Solution which worked for me after trying out all the options on the listed above and on other sites regarding using FireBase oAuth was the following:

  1. login at https://console.cloud.google.com
  2. Go to APIs & Services > Credentials

enter image description here

Once here, locate API Key you are using in your app that connects to FireBase

  1. Now add your custom domain to HTTP Referrers

enter image description here

enter image description here

For android or ios or having your application on all three mediums, you will need to create API keys per medium.


I solved the problem by adding the localhost domain to OAuth redirect domains (within SETUP SIGN IN METHOD on the Auth tab of Firebase console).