dnplus / streamlit-oauth

Simple OAuth Component for Streamlit App
MIT License
111 stars 18 forks source link

SSLCertVerificationError after button click #30

Open m3xw3ll opened 3 months ago

m3xw3ll commented 3 months ago

Hello,

We have a local Keycloak instance running and I would like users of the Streamlit app to authenticate themselves via it. When the user clicks on the login button and enters his credentials the error message appears:

SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)

How do I get rid of this error message?

MattMacs commented 3 months ago

Pushing this issue up... having the same problem running a local Authentik instance... even bringing Streamlit to SSL with self-signed certificate doesn't help...

dnplus commented 2 months ago

I think you should try ignore ssl verify globally

for example

https://stackoverflow.com/questions/15445981/how-do-i-disable-the-security-certificate-check-in-python-requests

m3xw3ll commented 2 months ago

I think you should try ignore ssl verify globally

for example

https://stackoverflow.com/questions/15445981/how-do-i-disable-the-security-certificate-check-in-python-requests

Unfortunately, this does not solve the problem. Even if I add the function as described, which sets verify to False, the exact same error message appears.

MatthiasBeyens commented 1 month ago

Same issue here, even after trying with the above.

dnplus commented 1 month ago

This component was built using httpx-oauth

refer to https://www.python-httpx.org/advanced/ssl/

It seems that httpx-oauth does not provide any interface to replace the httpx client.

I am thinking about switching to authlib, but I'm not sure if it's a good idea. #39