django-saml2-auth icon indicating copy to clipboard operation
django-saml2-auth copied to clipboard

KeyError at /saml2_auth/acs/ 'email'

Open animeshgupta720 opened this issue 4 years ago • 0 comments
trafficstars

Hello, I am getting a KeyError when I run the code, specifically I see the following variable in the code user_identity = authn_response.get_identity() under the acs function as empty which is causing the KeyError later.

My Django version - 3.1.12 Python - 3.7.7

The value of 'authn_response' is a decoded xml saml response which contains the attributes being passed on from Okta. However, as mentioned above, when I use the user_identity = authn_response.get_identity() part of code, it doesn't return anything causing the KeyError in the next line that attempts to access the empty dict.

Can someone please help me with this issue?

animeshgupta720 avatar Jul 27 '21 08:07 animeshgupta720