perhaps support OIDC_CLIENTS = None
got a few errors when doing local dev but not wanting to config OIDC_CLIENTS but using URL
File "/usr/local/lib/python3.11/site-packages/django/conf/__init__.py", line 104, in __getattr__
val = getattr(_wrapped, name)
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Settings' object has no attribute 'OIDC_CLIENTS'
After adding OIDC_CLIENTS = None
to settings:
get error:
File "/home/vscode/.local/lib/python3.11/site-packages/oidc_auth/__init__.py", line 8, in <module>
for name, client in settings.OIDC_CLIENTS.items():
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'items'
then another attempt...
File "/home/vscode/.local/lib/python3.11/site-packages/oidc_auth/urls.py", line 17, in <module>
first_option = list(settings.OIDC_CLIENTS.keys())[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
another
File "/home/vscode/.local/lib/python3.11/site-packages/oidc_auth/oauth.py", line 11, in __init__
server_metadata_url=client['auth_server'] + client.get('openid_configuration_path', '/.well-known/openid-configuration'),
~~~~~~^^^^^^^^^^^^^^^
KeyError: 'auth_server'
this worked.
OIDC_CLIENTS = {'none':{ 'auth_server': ''}}
Sure I should user a different url.py
but it might be best to accept OIDC_CLIENTS = None