Certification error

Hello, I am following the Okta+Flask integration guide. I created the application but I keep getting following error when I click on login button and put my dev account email and password:

“ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:2361)”

I have tried inserting following code to create unverified context, but it doesn’t work either.

try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn’t verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn’t support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context

Can anyone please help me with this issue ? I have app.config[“OIDC_COOKIE_SECURE”] set to False.

URL to tutorial: https://developer.okta.com/blog/2018/07/12/flask-tutorial-simple-user-registration-and-login

Thanks in advance!

Didn’t find a specific way to fix it, but changing the version of python a few time worked.

I originally had the newest version (3.7.1) of python installed and then I switched to 3.5.1. And then I reverted back to 3.7.1 during which I had to re-install the flaskoidc package.

After then, the error seemed to have gone away.

Thanks!