Django allauth refuse to recognize google socialaccount

I encountered a weird behavior that is really frustrating.



    # custom apps

    # allauth

    # providers for social accounts

    # Needed to login by username in Django admin, regardless of `allauth`

    # `allauth` specific authentication methods, such as login by e-mail


        'SCOPE' : [
        'APP': {
            'client_id': os.environ['GOOGLE_AUTH_CLIENT_ID'],
            'secret': os.environ['GOOGLE_AUTH_CLIENT_SECRET'],
            'key': '',
    'github': {
        'SCOPE' : [
        'APP': {
            'client_id': os.environ['GOOGLE_AUTH_CLIENT_ID'],
            'secret': os.environ['GOOGLE_AUTH_CLIENT_SECRET'],
            'key': '',
        'AUTH_PARAMS': {
# login.html

<a href="{% provider_login_url 'google' %}"  Login with social </a>

>>> raise ImproperlyConfigured(f"unknown provider: {app.provider}")
django.core.exceptions.ImproperlyConfigured: unknown provider: google
[13/May/2024 13:36:30] "GET /accounts/login/ HTTP/1.1" 500 128820
# login.html

<a href="{% provider_login_url 'github' %}"  Login with social </a>

>>> Starting development server at
Quit the server with CTRL-BREAK.

[13/May/2024 13:43:25] "GET /accounts/login/ HTTP/1.1" 200 5243
[13/May/2024 13:43:27] "GET /accounts/github/login/ HTTP/1.1" 200 1536
[13/May/2024 13:43:29] "GET /accounts/login/ HTTP/1.1" 200 5243

Somehow, my login template was able to load a github social account URL using the wrong config, but complains when provider_login_url was set to google.

From Google cloud console Client ID for Web application, I’ve already set the necessary URLs for development.

Authorized JavaScript origins
For use with requests from a browser
URIs 1
URIs 2 

Authorized redirect URIs
For use with requests from a web server
URIs 1
URIs 2
URIs 3 
URIs 4 

I went through a couple tutorials that all said the same thing, somehow I was unable to get around this problem. I tried a wrong URL to check the URLs django registers:

Django tried these URL patterns, in this order:

accounts/ login/ [name='account_login']
accounts/ logout/ [name='account_logout']
accounts/ inactive/ [name='account_inactive']
accounts/ signup/ [name='account_signup']
accounts/ reauthenticate/ [name='account_reauthenticate']
accounts/ email/ [name='account_email']
accounts/ confirm-email/ [name='account_email_verification_sent']
accounts/ ^confirm-email/(?P<key>[-:\w]+)/$ [name='account_confirm_email']
accounts/ password/change/ [name='account_change_password']
accounts/ password/set/ [name='account_set_password']
accounts/ password/reset/ [name='account_reset_password']
accounts/ password/reset/done/ [name='account_reset_password_done']
accounts/ ^password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$ [name='account_reset_password_from_key']
accounts/ password/reset/key/done/ [name='account_reset_password_from_key_done']
accounts/ 3rdparty/
accounts/ social/login/cancelled/
accounts/ social/login/error/
accounts/ social/signup/
accounts/ social/connections/

accounts/ github/ <<< where did google go???

accounts/ login/cancelled/ [name='socialaccount_login_cancelled']
accounts/ login/error/ [name='socialaccount_login_error']
accounts/ signup/ [name='socialaccount_signup']
accounts/ [name='socialaccount_connections']

The missing URL for google is resolved after I downgraded django-allauth version from 0.62.1 to 0.61.0.

I raised an issue to the repo. Unable to find google provider · Issue #3801 · pennersr/django-allauth · GitHub

Yes! Frustrating trying to get this to work… Your suggestion to downgrade to 0.61.0 did the trick. Many thanks.