Oauth2 bad_cert invalid_key_usage

the issue I was dealing with was due to the strictness of the Erlang TLS implementation. The OAuth server was returning its own certificate twice. Other implementations ignore this. The Erlang one did not. Try the openssl command line tool to check on your cert chain. It might be the same issue.

openssl s_client -connect your_server:443 -verify 3 -CAfile cacerts.pem

replace your_server with whatever your server name is. If the chain shows the same cert twice then its the same issue.

2 Likes