You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hello, I want to use an external OAuth2 client as a source in Authentik, as this client doesn't provide the necessary scopes for other applications and I wanted to use Authentik's property bindings to solve this issue. However, I ran into the issue below while trying to import it : it seems as though the response token doesn't contain the "token_type" field.
To Reproduce
Unique to my case and my OAuth2 provider
Expected behavior
I would like to know if there's anything that I can do to make it work.
Logs
Stacktrace from authentik
Traceback (most recent call last):
File "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", line 518, in thread_handler
raise exc_info[1]
File "/ak-root/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
response = await wrapped_callback(
^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", line 468, in __call__
ret = await asyncio.shield(exec_coro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/asgiref/current_thread_executor.py", line 40, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", line 522, in thread_handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/django/utils/decorators.py", line 48, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/authentik/sources/oauth/views/dispatcher.py", line 26, in dispatch
return view.as_view()(*args, source_slug=source_slug, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/authentik/sources/oauth/views/callback.py", line 47, in dispatch
raw_info = client.get_profile_info(self.token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/authentik/sources/oauth/clients/oauth2.py", line 150, in get_profile_info
headers={"Authorization": f"{token['token_type']} {token['access_token']}"},
~~~~~^^^^^^^^^^^^^^
builtins.KeyError: 'token_type'
Version and Deployment (please complete the following information):
authentik version: 2024.4.2
Deployment: docker-compose
Additional context
The OAuth2 provider is a student association and I already told them about the issue, but they have a reputation of not tackling even the small issues, and this is a big one so I don't expect a resolution on their side anytime soon.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
Hello, I want to use an external OAuth2 client as a source in Authentik, as this client doesn't provide the necessary scopes for other applications and I wanted to use Authentik's property bindings to solve this issue. However, I ran into the issue below while trying to import it : it seems as though the response token doesn't contain the "token_type" field.
To Reproduce
Unique to my case and my OAuth2 provider
Expected behavior
I would like to know if there's anything that I can do to make it work.
Logs
Stacktrace from authentik
Version and Deployment (please complete the following information):
Additional context
The OAuth2 provider is a student association and I already told them about the issue, but they have a reputation of not tackling even the small issues, and this is a big one so I don't expect a resolution on their side anytime soon.
The text was updated successfully, but these errors were encountered: