[Fixed]-Django allauth google OAuth redirect_uri_mismatch error

26👍

Adding the following in production settings.py fixed the problem for me:

ACCOUNT_DEFAULT_HTTP_PROTOCOL=’https’

1👍

**This worked for me :

  1. Go to https://console.developers.google.com
  2. Add without port http://127.0.0.1/accounts/google/login/callback/
  3. Also Add http://localhost/accounts/google/login/callback/
  4. see the image in the link for detail

image

0👍

In my case, the problem was in the following:

  1. My website switched the access to HTTPS-only connections, while in Google API dashboard was http://profile.example.com/accounts/google/login/callback/.
  2. So, I changed:
    from http -> https and it begins to work fine.
    enter image description here

Leave a comment