All google Login Urls unavailable: Reverse for 'google_login' not found.

I hit the bug first here:

Reverse for 'google_login' not found. 'google_login' is not a valid view function or pattern name.

on my home page

After some digging I realized that I do not have any url that is of the pattern ‘accounts/google/…’

I used to have all these urls previously in this same project, They seem to have dissapeared. [Returned to this project after a while]

Do let mw know if you have any insights you could have on how I could solve it.

[part of] My



SITE_ID  = 1 # for app django.contrib.sites

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

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

# Application definition


    # added 3rd party apps:
    'django.contrib.sites', # required by allauth
    'allauth.account', # local account
    'allauth.socialaccount', # social account login

    # adding created apps:


# Provider specific settings
    'google': {
        'APP': {
            'client_id': '<MyID>', 
            'secret': '<MySecret>',
            # 'key': '' 
        'SCOPE': [
        'AUTH_PARAMS': {
            'access_type': 'online', # default
        'OAUTH_PKCE_ENABLED': True,


ROOT_URLCONF = 'asapawa.urls'

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [

                # ADDED:
                # `allauth` needs this from django

WSGI_APPLICATION = 'asapawa.wsgi.application'

# Database

    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',

my project’s

from django.contrib import admin
from django.urls import path, include

urlpatterns = [

    #ALL AUTH:
    path('accounts/', include('allauth.urls')),

    #MAIN APP: [make sure to keep it last]
    path('', include("websiteMain.urls"))

Using Django==3.2.19 and django-allauth==0.54.0

Does anyone have any lead I could pursue? I am puzzled…

stumbled upon the same problem, have you figured out something?

Unfortunately not :frowning:

I started a new project, and I had the same issue there too. I also tried downgrading the version… No luck.


It was due to very bad error handling inside the allauth package, I went inside the allauth package’s and did some changes to identify the error. Here is the changed venv\Lib\site-packages\allauth\ (all the print statements were added by me):

from importlib import import_module

from django.urls import include, path

from allauth.socialaccount import providers

from . import app_settings

urlpatterns = [path("", include("allauth.account.urls"))]

    urlpatterns += [path("social/", include("allauth.socialaccount.urls"))]

# Provider urlpatterns, as separate attribute (for reusability).
provider_urlpatterns = []
for provider in providers.registry.get_list():
        print(, ":", provider.get_package())
        prov_mod = import_module(provider.get_package() + ".urls")
    except ImportError as e:
    prov_urlpatterns = getattr(prov_mod, "urlpatterns", None)
    if prov_urlpatterns:
        provider_urlpatterns += prov_urlpatterns
urlpatterns += provider_urlpatterns

Atleast in my case, There was indeed an exception! It was because urllibv2.0 did not support the old open SSL in my machine… Here is my output after using the changed package:

Watching for file changes with StatReloader
Performing system checks...

google :
urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0h  27 Mar 2018'. See:
System check identified no issues (0 silenced).
August 06, 2023 - 20:29:45

So I downgraded urllib to an older version and it solved the errors in a jiffy! I would suggest you use the modified and see why the google urls are not being imported for you.