Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google OAuth2 Authorizing OAuth token error: redirect_uri_mismatch

Tags:

I am Creating and Authorizing an OAuth Token according to this webpage: https://code.google.com/p/google-mail-oauth2-tools/wiki/OAuth2DotPyRunThrough

But I got this error: redirect_uri_mismatch.

The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI from_login=1 cookie_policy_enforce=false scope=https://mail.google.com/ response_type=code access_type=online redirect_uri=urn:ietf:wg:oauth:2.0:oob as=-80019291b2cb8ed display=page pli=1 client_id=...... authuser=0 hl=en 

I thought this might be helpful: Google OAuth 2 authorization - Error: redirect_uri_mismatch

But when I try to register the redirect url to my console, I was told that the url is invalid.

like image 270
Cacheing Avatar asked Jul 30 '13 17:07

Cacheing


People also ask

What does Error 400 Redirect_uri_mismatch mean?

This error typically means the Client Redirect URL was not properly added to the OAuth Web Application in the Google Cloud Console. To resolve this, the user will need to copy the Client Redirect URL from the Single Sign-On Settings page from ThinkCentral, my.hrw.com, or HMH Ed.

How do I fix OAuth error?

When a user tries to login after the session id is expired, the system throws the OAuth error. Solution: Typically, clearing the browser or device cache fixes the problem.


1 Answers

The redirect_uri (urn:ietf:wg:oauth:2.0:oob) is only applicable to those Google client ids that have been generated for installed applications. You can go to your console and create a new client id of this type.

like image 125
oravecz Avatar answered Oct 06 '22 02:10

oravecz