Getting error on login with angular 2 google and firebase - authentication

I am using firebase 3 and ng 2.
My issue I am getting error when click on connect with google account.
My error is:
Error: redirect_uri_mismatch
400. That’s an error.
Error: redirect_uri_mismatch
Application: Events Manager
You can email the developer of this application at: .....#gmail.com
The redirect URI in the request, https://......firebaseapp.com/__/auth/handler, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/......apps.googleusercontent.com?project=181586 to update the authorized redirect URIs.
my project runs on http://localhost:3000/#/login
when I am going to console.developers.google.com Authorized redirect URIs-> http://localhost:3000/
Any idea whey is it happens?

the issue was need to add to firebase auth link the correct host.
firebase-> OAuth redirect domains

Related

401 redirect_uri_mismatch with .net core web application?

Authorization Error
Error 400: redirect_uri_mismatch
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the redirect URI in the Google Cloud Console.
The redirect uri sit he URI where you are telling the authorization server to return authorization to. This uri must be registered in Google developer console for your project.
So redirect uri miss match means that your application is telling the authorization server to return the authorization code to a uri that you have not configured in Google developer console. The easiest solution is to take the uri its telling you is missing and simply add it.
This video will show you how to add it. Google OAuth2: How the fix redirect_uri_mismatch error.

Keycloak login page shows 'invalid parameter: redirect_uri'

I am using Keycloak authentication to authenticate an angular app and so far I have managed to redirect my login to Keycloak server. But when redirected instead of the login page I am getting a 500 error page with the message Invalid parameter: redirect_uri
When you created the client in Keycloak you set the required 'Valid Redirect URIs' field. Most likely the pattern you entered there doesn't match the redirect uri you are sending from your client. If you use ports numbers, they have to match too!.
If this is not the problem, check what your Keycloak server is logging and add those details here to your question.
this is occurred due to base url and valid redirect url are different. So I have added same URL on both the text box.Now its working fine.

App not listed in authorized apps in google account

When i try get access token via oauth (oauth screen with Allow button) on my local machine it works, but when i do the same on test server: i get oauth screen, i press allow and it's redirects to callback uri with code, and then app asking for token (i use PHP lib):
$client->authenticate($request->get('code'));
$access_token = $client->getAccessToken());
and i get null in response and application does not get authorized and it's not in authorized apps in google account.
I've checked redirect URLs listed in Google APIs - everything matches!
And i don't get any errors from google, it's just redirects to callback url and not adds application to authorized apps list.
But it works on local with same credentials. Any one can help me and guide where the problem can be?
Solved. I did not set redirect url before $client->authenticate($request->get('code'));

Custom local URL results in redirect_uri_mismatch

I am using a custom local URL for development of a project that authenticates with both Google and Adwords using OAuth2.
The entry in my /etc/hosts file looks like:
127.0.0.1 sub.example.dev:3001
In the Google Cloud Platform console I have an OAuth 2.0 client ID setup with:
type: Web Application
Authorized JavaScript origin: http://sub.example.dev:3001
Authorized redirect URIs:
http://sub.example.dev:3001/auth/adwords/callback
http://sub.example.dev:3001/auth/google/callback
I authenticate with with both Google and Adwords separately. Previously I was using localhost:3001 instead of the custom URL which was working for both Google and Adwords. After switching to the custom local URL the Google auth still works, but when I try to authenticate with Adwords I get a redirect_uri_mismatch error.
The error page tells me that "The redirect URI in the request, sub.example.dev:3001/auth/adwords/callback, does not match the ones authorized for the OAuth client." The URI reported here is exactly the same as what I have as an authorized redirect URI (minus the protocol).
Why does this work with Google OAuth, but not Adwords? How can I get a custom local redirect URL to work with Adwords OAuth?
Thanks!
I found the issue, and there was a hint in the question itself. The redirect URL that I pass during the OAuth flow needs to contain the protocol and I had missed that in my config.
The redirect URL I was passing in the OAuth flow was sub.example.dev:3001/auth/adwords/callback
I changed it to http://sub.example.dev:3001/auth/adwords/callback and now it works! :D

API google analytics v3.0 : avec OAuth 2.0,

I'm trying to install but I get the following error:
400. That’s an error.
Error: redirect_uri_mismatch
Application: Google analitycs
You can email the developer of this application at: sextoysunivers#gmail.com
The redirect URI in the request: http://sextoysunivers.com/modules/gapi/oauth2callback.php did not match a registered redirect URI
I have tried for all shops tab, individually, with the number after the p in my google analytics browser, and with the UA code getting the same error.
You have to register the redirect_uri in the Google Developer Console. After you log in click on APIs & auth, then Credentials and enter your redirect_uri into the redirect_URIs text-area