Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError at /keycloak/login 'NoneType' object has no attribute 'client' #62

Open
bastianhilton opened this issue Sep 5, 2021 · 1 comment

Comments

@bastianhilton
Copy link

I am having this issue: AttributeError at /keycloak/login
'NoneType' object has no attribute 'client' when attempting to login to my admin area on my site.

I have followed each of the directions listed here to install django-keycloak to my application: https://django-keycloak.readthedocs.io/en/latest/index.html

This is a snippet of my settings.py:

middleware = [
'django_keycloak.middleware.BaseKeycloakMiddleware',
'django_keycloak.middleware.RemoteUserAuthenticationMiddleware',
]

AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'pinax.announcements.auth_backends.AnnouncementPermissionsBackend',
'django_keycloak.auth.backends.KeycloakAuthorizationCodeBackend',
)

LOGIN_URL = 'keycloak_login'

urls.py

url(r'^keycloak/', include('django_keycloak.urls')),

Can someone please help me understand what is going on.

Also here are my setup for keycloak:

  • Keycloak installed on localhost
  • Postgres database
  • Client with Client ID and Secret are setup with Realm
@peng-cheng-li
Copy link

Have you solved this issue? I got the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants