urbanplatform / django-keycloak-auth

Middleware to allow authorization using Keycloak and Django for django-rest-framework (DRF). This package should only be used in projects starting from scratch, since it overrides the users' management.
MIT License
32 stars 14 forks source link

Auth of superuser fails with JWT decode and KeycloakUser #6

Closed moritz89 closed 2 years ago

moritz89 commented 2 years ago

Authenticating the superuser from an OAuth2 client with JWT decoding enabled and while using the KeycloakUser class causes an exception to be thrown.

I'll create a new PR and send it your way.

moritz89 commented 2 years ago

Cause was an old user in the DB with the same username but different ID. Having the clean up Celery task running would have resolved this problem automatically. Deleted the user and now the problem went away.