Uncaught (in promise) FirebaseError: Firebase: Error (auth/unauthorized-domain). error [duplicate] - reactjs

This question already has answers here:
Firebase Auth/unauthorized domain. Domain is not authorized
(8 answers)
Closed 4 months ago.
When I try to open google sign-in in the deployed version of my app I get this error in the console and the popup closes. I have googled a bit about this error and I found that I need to add the domain in my firebase through Authentication -> SignIn method ->Authorized domains and then add the domain I have also tried this but it doesn't work.
and when I try to open the google sign in popup I get this error in the console:
How can I enable google authentication in the deployed app?

Open Firebase
Go to console
Open your project
Go to Authentication
sign-in-method
Add domain
Try it!
In my case it's working

Related

Snowflake 403 error using Google as Identity Provider IdP

I'm trying to configure google IdP on my Snowflake following this tutorial from Snowflake community:
https://community.snowflake.com/s/article/configuring-g-suite-as-an-identity-provider?t=1630354048853
After the whole configuration is complete when I click on the SSO button on the login page
SSO Screen
I receive the following error:
Error Message
I have already double-checked the SAML configuration on both platforms
SAML Configurations
And APP configuration on Google seems correct
Google Snowflake App configurations
Google Snowflake App configurations
But the 403 error still persists.
How can I identify exactly where is the problem (Snowflake or Google) and how to fix it?
Is there any log I should be checking or any configuration missing?
Thanks!
We ran into this error as well, but fortunately the solution was rather simple in our case:
Either use incognito mode
Or log out & back in to the Google account
Afterwards, it works flawlessly! 👌
I found this article from Google Support:
403 app_not_configured_for_user To resolve the 403
app_not_configured_for_user error:
Verify that the value in the saml:Issuer tag in the SAMLRequest
matches the Entity ID value configured in the SAML Service Provider
Details section in the Admin console. This value is case-sensitive.

Salesforce Oauth Error. 1814 : An unexpected error has occured during authentication

I am creating a meteor app which has login through salesforce using oauth. The login happens through a community app. For the oauth credentials I created a connected app on salesforce(sandbox) with full access.
Initially the login was working fine but then after a few days I started getting the following error.
We can't authorize you because of an OAuth error.
1814 : An unexpected error has occured during authentication. Please try again
But after this when I attempt the login again (i.e. going back to app screen from the salesforce error screen)from my app, I receive the access code from salesforce and I am able to fetch data through salesforce apis.
I tried looking for this error but did not find anything useful.
Any help would be appreciated. Thanks in advance.

firebase auth domain not authorized even after whitelisting domain

I am using Firebase Auth (firebase 4.1.3) in my Angular4 project with Google sign in enabled. While working on localhost everything works as expected. However, when deploying my app hosted on Google App Engine, authentication popup fails with the "auth/unauthorized-domain" error.
How can I whitelist my custom domain in Firebase?
Checks already done:
My firebase project has billing enabled and active
Google sign-in with pop-up works on localhost
Google app engine domain is already whitelisted in "Authorized Domains" under Sign-In method, in Authenticacion module of Firebase console.
Double checked the javascript firebase config in my angular app (I copy-pasted the snippet given by the firebase console).
In the Google Cloud Console, the default web API key has no access restrictions and the OAuth client id already contains my App Engine domain in the list of "Authorized JavaScript origins" and also in the "Authorized redirect URIs" (https://console.developers.google.com/apis/credentials?project=MYPROJECT).
Some other similar SO questions refer to checking the previous things and even waiting up to 20 mins after whitelisting a new domain to allow change propagation. But none of these advices worked for me.
NOTE: Full error code
{
code: "auth/unauthorized-domain"
message: "This domain (PROJECT.appspot.com) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab."
}
Any help would be appreciated.
Ok, Answering my own question. I finally found the problem: I was deploying an old version of the web app. So it will never work this way...
In case it could be useful to others, the above steps for configuring firebase Auth are correct and enough!
I was taking over an existing project, and I got this error while deploying with the wrong environment. (the domain was correctly setup in Firebase)
ng build --prod && firebase deploy
While was deploying on my Dev Environment.
I've scripted the deployment to avoid this kind of mistake.
ng build --configuration "${ENV}" && firebase deploy
where env var is set as an argument of the script
I have faced the same problem. Then I find Out the solution.
First goto your firebase project then click Authentication goto sign-in method then scroll down you will find Authorized domains add your live site link there. Hurrey Problem Solved.
Authentication > sign-in medhod > Authorized domains
firebase solution image

Firebase authentication timeout with Google account login

Please can anyone help with config/troubleshooting for Firebase authentication with GAE Python apps.
I've tried to get the Firenotes app working (https://cloud.google.com/appengine/docs/python/authenticating-users-firebase-appengine) but when the app loads there's a popup with the error: The operation has timed out. Dismiss.
The email authentication works fine, all OK: can login, save notes, logout.
The problem is with the Google OAuth login.
Clicking on the Google sign button gives an error:
This site can’t provide a secure connection.
firebaseapp.com didn’t accept your login certificate, or your login certificate may have expired.
ERR_BAD_SSL_CLIENT_AUTH_CERT
The project was imported into the firebase project and as far as I can tell the config of main.js and app.yaml is correct.
The GAE .appspot.com has been added to the OAuth authorized doamins
The same error is if running local or deployed to GAE.
If you go to the 'Overview' section of your firebase console. You can select to "add firebase to your web app". A screen pops up with the config information for the frontend main.js file.
Mind you, the apiKey in the client config needs to be set to the google cloud platform api key for the app engine project your using.
This will enable the login.

cakephp plugin for google login (cakephp 2.x)?

I started to configure google login on my new application.
but i keep getting the following error:
Error fetching OAuth2 access token, message: 'invalid_grant'
this is where google redirects it
mydomain/users/googleLogin?code=4/eNLkWLNm4ywTLcPDN4obcH_PZIRj.wsIKrDgwdCseXE-sT2ZLcbSD1t1_iAI
if I removed the ? mark from the url this works fine. Please help me with this.

Resources