Closed susanacmdias closed 2 years ago
@moritz89 Could this be the same issue as https://github.com/urbanplatform/django-keycloak-auth/issues/38 ? We need to check if this is solved in v2.
EDIT: For what is reported by @moritz89. This issue is probably gone in our version 2. We are close to release. Maybe we should add tests for this issue
I've added a test that approximates this issue: tests/test_site/test_app/tests/test_middleware.py:TestErrorHandling:test_invalid_auth_token
. @Sudms Could you test it with that branch / when it is released?
@Sudms Could you check if the bug still persists?
I'm closing this issue due to inactivity. Feel free to open it as required.
Describe the bug After being logged in for some time, the user gets a 500 error, "null value in column "first_name" of relation "users_keycloakprofile" violates not null cosntraint". It's not explicit, after debbuging we could find out that the token has expired, because if we ask for a new one it works. This doesn't happen every time, just every now and then.
To Reproduce Steps to reproduce the behavior:
Expected behavior When the token is expired, we want to receive a 401 Not Authorized, however we get a 500(null value in column "first_name" of relation "users_keycloakprofile" violates not null cosntraint)
Screenshots
Desktop (please complete the following information):