Open cheslijones opened 4 years ago
Quite disappointing this didn't receive any sort of reply ...
I think its supposed to be
serializer.is_valid(raise_exception=True)
serializer.data
Try changing this line user = request.backend.do_auth( serializer.validated_data['access_token'])
with
user = backend.do_auth( access_token, response={"id_token": id_token}) #Id token you will get along with access token.
I am getting the same AttributeError:
AttributeError: 'NoneType' object has no attribute 'get'
Traceback (most recent call last) File "C:\Users\Jayanth.virtualenvs\helloworld-CPu4KsHf\lib\site-packages\flask\app.py", line 2088, in call return self.wsgi_app(environ, start_response) File "C:\Users\Jayanth.virtualenvs\helloworld-CPu4KsHf\lib\site-packages\flask\app.py", line 2073, in wsgi_app response = self.handle_exception(e) File "C:\Users\Jayanth.virtualenvs\helloworld-CPu4KsHf\lib\site-packages\flask\app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "C:\Users\Jayanth.virtualenvs\helloworld-CPu4KsHf\lib\site-packages\flask\app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\Jayanth.virtualenvs\helloworld-CPu4KsHf\lib\site-packages\flask\app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\Jayanth.virtualenvs\helloworld-CPu4KsHf\lib\site-packages\flask\app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "D:\ExcelSoft\venil\Cognitive-Behavioural-Chatbot-master\helloworld\web.py", line 26, in webhook res = processRequest(req) File "D:\ExcelSoft\venil\Cognitive-Behavioural-Chatbot-master\helloworld\web.py", line 36, in processRequest print ("starting processRequest...",req.get("result").get("action")) AttributeError: 'NoneType' object has no attribute 'get'
The code is: web.txt
How to correct what is written below (python 3):
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Dani Brothers\Anaconda3\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
File "D:/Python/Book Bank/New folder/PyCharm/Final/Excel.py", line 57, in SaveBook
e_pissue.get(),
AttributeError: 'NoneType' object has no attribute 'get'
Process finished with exit code 0
Been trying to fix this for a few days now.
Error:
This is the line it refers to in the traceback:
https://github.com/python-social-auth/social-core/blob/9d93069564a60495e0ebd697b33e16fcff14195b/social_core/backends/azuread_tenant.py#L97
I've verified my ReactJS FE is correctly sending the
access_token
as I can print it out server-side withprint(request.data)
andprint(serializer.validated_data['access_token'])
. Everything seems to be flowing properly until it gets to verifying theaccess_token
server-side at:The user it is trying to validate should not be in the database currently, if that helps.
Suggestions for what I'm doing wrong here or how to resolve it?