Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django allauth login with google account: Error: redirect_uri_mismatch

I am using django-allauth and am trying to login to my website through gmail account. I have set up the api

Google API

Redirect URIs:  https://tutor.herokuapp.com/accounts/google/login/callback
JavaScript origins: https://tutor.herokuapp.com

But when I click on the Google link to sign in I get the error

Error: redirect_uri_mismatch
The redirect URI in the request: http://tutor.herokuapp.com/accounts/google/login/callback/ did not match a registered redirect URI

I dont get exactly where I have gone wrong because Twitter and Facebook logins were successful. help pls

like image 393
flexxxit Avatar asked Oct 18 '25 10:10

flexxxit


1 Answers

You have configured a HTTPS redirect URI, whereas your Django app is using HTTP URIs. Either add http://tutor.herokuapp.com/accounts/google/login/callback over at the Google API console, or use HTTPS for your Django project.

like image 118
pennersr Avatar answered Oct 22 '25 06:10

pennersr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!