Hello,
I am currently trying to integrate an OIDC authentication backend for Hue that interacts with an OAuth 2.0 client that provides tokens to the Hue application.
I confirmed the OAuth 2.0 client works from Postman as expected, so the issue seems to be stemming here. I narrowed down that it seems to be failing due to an internal server error when trying to access /oidc/callback/ endpoint. I defined a login_redirect_url, like the example in hue.ini as seen below.
However, I am seeing an error like the message below after logging in from the OAuth client when it tries to redirect to the /oidc/callback/ endpoint. Is this the right callback? Should I be using a different endpoint?
[04/May/2020 13:28:48 -0700] exception ERROR Session `oidc_state` does not match the OIDC callback state
[04/May/2020 13:28:48 -0700] exception ERROR Internal Server Error: /oidc/callback/
Traceback (most recent call last):
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/core/handlers/exception.py", line 109, in get_exception_response
response = callback(request, **dict(param_dict, exception=exception))
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/views/defaults.py", line 88, in bad_request
template = loader.get_template(template_name)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/template/loader.py", line 18, in get_template
engines = _engine_list(using)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/template/loader.py", line 72, in _engine_list
return engines.all() if using is None else [engines[using]]
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/template/utils.py", line 89, in all
return [self[alias] for alias in self]
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/template/utils.py", line 79, in __getitem__
engine_cls = import_string(backend)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/lib/hue/build/env/lib/python2.7/site-packages/djangomako-1.0.1-py2.7.egg/djangomako/backends.py", line 15, in <module>
from django.template.base import TemplateDoesNotExist, TemplateSyntaxError
ImportError: cannot import name TemplateDoesNotExist