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

Unhandled internal server error #12

Open
lilioid opened this issue Jan 12, 2024 · 0 comments
Open

Unhandled internal server error #12

lilioid opened this issue Jan 12, 2024 · 0 comments

Comments

@lilioid
Copy link
Member

lilioid commented Jan 12, 2024

The Error

When performing a login using this library, the following error happened during authentication.
It was not handled by the library in any way and not documented.

Internal Server Error: /auth/openid/login-callback/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/views/generic/base.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/views/generic/base.py", line 142, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/simple_openid_connect/integrations/django/views.py", line 64, in get
    token_response = client.authorization_code_flow.handle_authentication_result(
  File "/usr/local/lib/python3.9/dist-packages/simple_openid_connect/flows/authorization_code_flow/client.py", line 86, in handle_authentication_result
    return impl.handle_authentication_result(
  File "/usr/local/lib/python3.9/dist-packages/simple_openid_connect/flows/authorization_code_flow/__init__.py", line 70, in handle_authentication_result
    raise AuthenticationFailedError(
simple_openid_connect.exceptions.AuthenticationFailedError: error='access_denied' error_description=None error_uri=None state=None

What we should do

We should handle this error better in the login-callback view to tell the user to try again or something similar.

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

1 participant