Background: I'm trying to test a localhost login of django-microsoft-auth 
2.4.0. 

I've read and followed the documentation: *Usage 
<https://django-microsoft-auth.readthedocs.io/en/latest/usage.html#quickstart>*

I've configured it step by step and it returns an error. TypeError: 
'NoneType' Object is not subscriptable. 

Here is the dpaste:

Environment: Request Method: GET Request URL: http://127.0.0.1:8000/ Django 
Version: 3.2 Python Version: 3.9.2 Installed Applications: 
['django.contrib.admin', 
'django.contrib.auth', 'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.messages', 'django.contrib.staticfiles', 
'STMain.apps.StmainConfig', 
'django.contrib.sites', 'microsoft_auth'] Installed Middleware: 
['django.middleware.security.SecurityMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.middleware.clickjacking.XFrameOptionsMiddleware'] 
Traceback (most recent call last): File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\exception.py",
 
line 47, in inner response = get_response(request) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\base.py",
 
line 181, in _get_response response = wrapped_callback(request, 
*callback_args, **callback_kwargs) File 
"C:\Users\Muhammad.ariffin\PycharmProjects\Django_Website\STWebsite\STMain\views.py",
 
line 11, in home return render(response, "STMain/home.html", {}) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\shortcuts.py",
 
line 19, in render content = loader.render_to_string(template_name, 
context, request, using=using) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\template\loader.py",
 
line 62, in render_to_string return template.render(context, request) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\template\backends\django.py",
 
line 61, in render return self.template.render(context) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\template\base.py",
 
line 168, in render with context.bind_template(self): File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\contextlib.py",
 
line 117, in __enter__ return next(self.gen) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\template\context.py",
 
line 244, in bind_template updates.update(processor(self.request)) File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\microsoft_auth\context_processors.py",
 
line 48, in microsoft auth_url = microsoft.authorization_url()[0] File 
"C:\Users\Muhammad.ariffin\AppData\Local\Programs\Python\Python39\lib\site-packages\microsoft_auth\client.py",
 
line 161, in authorization_url auth_url = 
self.openid_config["authorization_endpoint"] Exception Type: TypeError at / 
Exception 
Value: 'NoneType' object is not subscriptable

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5d0c60e6-260b-4f64-8983-11a7e44067e3n%40googlegroups.com.

Reply via email to