Auth0 Certificate Error: ValueError: Unable to load certificate

Hi all,

I’m trying to integrate Auth0 with my Django Rest Framework backend. I’m stuck with this error:

service_1  |    File "/usr/local/lib/python3.6/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1138, in load_pem_x509_certificate
service_1  |    raise ValueError("Unable to load certificate")
service_1  |    ValueError: Unable to load certificate

Certificate in question appears to be well formed

MIIC+zCCAeOgAwIBAgIJQUjS7meQqGE0MA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNVBAMTEGNzdGVzdC5hdXRoMC5jb20wHhcNMTgwOTE5MDMyODQwWhcNMzIwNTI4MDMyODQwWjAbMRkwFwYDVQQDExBjc3Rlc3QuYXV0aDAuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0MyHIRDcUNjLp1DJxOuduh8hsbv00blzNY1Jtm8ligvva9MaM2kiSNLNIO947KvFits/1I4M/TkIpMd6swNI4GPdLXSejQXsmNsfMGX+B5p1Xgk2KjuQDrBsC9sC/hG1xB+S2ycvTBbCx8hUL+iVeddMwwijQm2X+wFMt4c/MJJZ3g0ZdYDaTPvzU63FdmoCosQcEer4jnGz7duZZO6lK/RVDbENC123VyG0NBl35/y7IAckJNbpJPhySIQDcMSP6zTqGgGL0On4jjYplYAdtKST2nEwV98vbI4H7os0LzWbo17zQyZE2irSna1wLD+LYYufX2Z3lOFHExNYh+icuQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRVmruUqbvIOr5H/7wJICKAyQNyxjAOBgNVHQ8BAf8EBAMCAoQwDQYJKoZIhvcNAQELBQADggEBAGSDg5ecP0O2PRkmWjt1YR/VzkWW+X820FKlLJ4vKCd9HQWbkeKqzHU/zVegFPUVINThAwm48MpNCQpfcy7MtXppijNlp/gHgpi5XsoUk3caBsthvULivNmn4O1oQgAemjj2ZDcSeO6e43zN/+44IXHqAo0s9ljst40jtzZG8/KjdUESOB8+cQYVDmarpYv/LMod4NmeZIhMBVZqdWKqgun4QpBd5zyC0dC2UR0nYnMj/Z67LcCe6JTA3mYCaQcN8QAQHzJJQqA/gDYHhIu4488Rx79hScdxmgSt4XOHCty3iQjX+LbSzWV3YyB+nmObtaEfCveM9fZsRAG8NMY+NR0=

Its somewhat similar to this github issue, but it was not helpful in my case.

Also raised an issue on the cryptography github repo: [BUG] cryptography and Auth0 - ValueError: Unable to load certificate · Issue #4487 · pyca/cryptography · GitHub

Anyone has any ideas on how to debug?

Solved in [BUG] cryptography and Auth0 - ValueError: Unable to load certificate · Issue #4487 · pyca/cryptography · GitHub

Thanks a lot for sharing it with us!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.