Redirect URi Mismatch error in google-oauth2

1,437 views
Skip to first unread message

Priya Agrawal

unread,
Sep 28, 2014, 10:01:30 AM9/28/14
to django-so...@googlegroups.com
Hi Everyone, 

I have entered while creating the client id.
REDIRECT URIS
 
and then I amm getting the following error:

Error: redirect_uri_mismatch

The redirect URI in the request: http://www.fuf.me:8000/complete/google-oauth2/ did not match a registered redirect URI.

Learn more
Request Details

    response_type=code


I dont know what is going wrng here, please help me out.

Regards,
Priya

Matías Aguirre

unread,
Sep 28, 2014, 12:19:22 PM9/28/14
to Priya Agrawal, django-social-auth
Hi Priya,

The error is quite clear, you need to put this Redirect URL in the setting in
the Google Console:

http://www.fuf.me:8000/complete/google-oauth2/

Matías

Excerpts from Priya Agrawal's message of 2014-09-28 11:01:30 -0300:
> Hi Everyone,
>
> I have entered while creating the client id.
> REDIRECT URIS
>
> - http://fuf.me:8000/complete/social-oauth2
>
> and then I amm getting the following error:
>
> Error: redirect_uri_mismatch
>
> The redirect URI in the request:
> http://www.fuf.me:8000/complete/google-oauth2/ did not match a registered
> redirect URI.
>
> Learn more
> Request Details
>
> response_type=code
> scope=https://www.googleapis.com/auth/userinfo.email
> https://www.googleapis.com/auth/userinfo.profile
> redirect_uri=http://www.fuf.me:8000/complete/google-oauth2/
>
>
> I dont know what is going wrng here, please help me out.
>
> Regards,
> Priya
>

--
Matías Aguirre (matias...@gmail.com)

Priya Agrawal

unread,
Sep 28, 2014, 12:20:51 PM9/28/14
to Matías Aguirre, django-social-auth

I have tried that..but still no effect. Error is still there.

Matías Aguirre

unread,
Sep 28, 2014, 12:22:06 PM9/28/14
to Priya Agrawal, django-social-auth
Could you paste the URL that triggers the error?

Excerpts from Priya Agrawal's message of 2014-09-28 13:20:50 -0300:
--
Matías Aguirre (matias...@gmail.com)

Priya Agrawal

unread,
Sep 28, 2014, 12:48:49 PM9/28/14
to django-so...@googlegroups.com

Priya Agrawal

unread,
Sep 28, 2014, 12:51:09 PM9/28/14
to django-so...@googlegroups.com
CLIENT ID                              782603957507-3kgpd9pms5ebmehhj9eop0omksd3qe76.apps.googleusercontent.com 
EMAIL ADDRESS                  782603957507-3kgpd9pms...@developer.gserviceaccount.com  
CLIENT SECRET                   cPZlzDhX7OjDPGqubcJH5bMK  
REDIRECT URIS                   https://www.fuf.me:8000/complete/google-oauth2
JAVASCRIPT ORIGINS         https://www.fuf.me:8000/

On Sunday, 28 September 2014 19:31:30 UTC+5:30, Priya Agrawal wrote:

Matías Aguirre

unread,
Sep 28, 2014, 1:17:12 PM9/28/14
to Priya Agrawal, django-social-auth
You are missing the trailing slash in that conf.

Excerpts from Priya Agrawal's message of 2014-09-28 13:48:48 -0300:
> I have done the following entry in Google Console
> CLIENT ID
> 782603957507-3kgpd9pms5ebmehhj9eop0omksd3qe76.apps.googleusercontent.com EMAIL
> ADDRESS
> 782603957507-3kgpd9pms...@developer.gserviceaccount.com CLIENT
> SECRET cPZlzDhX7OjDPGqubcJH5bMK REDIRECT URIS
>
> - https://www.fuf.me:8000/complete/google-oauth2
>
> JAVASCRIPT ORIGINS
>
> - https://www.fuf.me:8000/
>
> URL that is triggering the error:
> https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=6CAzzdHnHSeMvy5sHvxId8TTIQw4WV5e&redirect_uri=http%3A%2F%2Fwww.fuf.me%3A8000%2Fcomplete%2Fgoogle-oauth2%2F&response_type=code&client_id=782603957507-3kgpd9pms5ebmehhj9eop0omksd3qe76.apps.googleusercontent.com
>
> Error: redirect_uri_mismatch
>
> Sometimes error changes to Invalid client.
> Then i have to create a new client id.
>
> It is showing very varying behaviour.
>
> On Sunday, 28 September 2014 19:31:30 UTC+5:30, Priya Agrawal wrote:
> >
> > Hi Everyone,
> >
> > I have entered while creating the client id.
> > REDIRECT URIS
> >
> > - http://fuf.me:8000/complete/social-oauth2
> >
> > and then I amm getting the following error:
> >
> > Error: redirect_uri_mismatch
> >
> > The redirect URI in the request:
> > http://www.fuf.me:8000/complete/google-oauth2/ did not match a registered
> > redirect URI.
> >
> > Learn more
> > Request Details
> >
> > response_type=code
> > scope=https://www.googleapis.com/auth/userinfo.email
> > https://www.googleapis.com/auth/userinfo.profile
> > redirect_uri=http://www.fuf.me:8000/complete/google-oauth2/
> >
> >
> > I dont know what is going wrng here, please help me out.
> >
> > Regards,
> > Priya
> >
>

--
Matías Aguirre (matias...@gmail.com)

Priya Agrawal

unread,
Sep 28, 2014, 1:34:29 PM9/28/14
to Matías Aguirre, django-social-auth

I have tried that also, but not solving the problem.

Matías Aguirre

unread,
Sep 28, 2014, 1:37:18 PM9/28/14
to Priya Agrawal, django-social-auth
Have you tried removing the https from that conf? Or ensuring that the https
URI is sent as redirect_uri?

Excerpts from Priya Agrawal's message of 2014-09-28 14:34:29 -0300:
--
Matías Aguirre (matias...@gmail.com)

Priya Agrawal

unread,
Sep 28, 2014, 1:49:34 PM9/28/14
to Matías Aguirre, django-social-auth

I have removed https from conf. Everytime http URI is sent as redirect-uri.

Reply all
Reply to author
Forward
0 new messages