SAML-Toolkits / python3-saml

MIT License
670 stars 302 forks source link

Callback stuck on auth.process_response #396

Closed NeuraByte-UCSD-ITS closed 1 week ago

NeuraByte-UCSD-ITS commented 4 months ago

backend: Fast API frontEnd: Next.js python3-saml version 1.15.0

Hi, I am using python3-saml for SSO implementation in my project which successfully takes me to the login page, Once I enter my credentials press login button it triggers callback function which gets stuck on this line "auth.process_response"

image image image image
jshelley commented 4 months ago

I am having this same issue.

pitbulk commented 4 months ago

Can you add a debugger and see where inside the process_response got stuck?

NeuraByte-UCSD-ITS commented 4 months ago

Hi, I was able to get that issue resolved by downgrading the lbxml library from version lxml==5.1.0 to lxml==4.9.4. However, now I have another issue. When I try to get attributes I am unable to get email, can this be configured in settings.json, advanced_settings.jscon or in saml.py?

image
image
pitbulk commented 4 months ago

I was able to get that issue resolved by downgrading the lbxml library from version lxml==5.1.0 to lxml==4.9.4

Have you tried to install the lxml library as follows:

pip install --force-reinstall --no-binary lxml lxml

When I try to get attributes I am unable to get email

It seems the IdP is providing username, eduPersonScopedAffiliation, firstname, lastname, fullname but not the email. You will need to contant the IdP administrator and ask them to release the email info in the SAMLResponse.

lovelydett commented 4 months ago

lxml==4.9.3 works, thx for saving my day.

smaccona commented 3 months ago

I had this issue with a Django 4.2 app. I can confirm that installing lxml via pip install --force-reinstall --no-binary lxml lxml seems to have fixed it. @pitbulk do you have any insight into why the binary package for lxml doesn't work? We prefer to use binaries in our build pipeline when possible.

I can also confirm that downgrading to lxml==4.9.4 also worked for us. That's what we're using in our build at the moment.

pitbulk commented 1 week ago

@smaccona if you search in the Issues section there were tons of issues recently with the lxml version for different reasons.

The main issue was due to incompatibilities with libxml2.

@NeuraByte-UCSD-ITS , you should not be using async calls for the SAML handshake.