Reputation: 61
I am using passport-azure-ad on my nodejs api project to authorize requests that are coming in with an access token, I keep getting this error during the authorization process:
AzureAD: Bearer Strategy","hostname":"","pid":20016,"level":30,"msg":"authentication failed due to: Error: unable to get local issuer certificate","time.
I dont know what could be causing this
Upvotes: 1
Views: 561
Reputation: 805
Here is the quick solution but it is not secure.
npm config set strict-ssl false
It is not secure because this above command fetchs the modules from the server even if the server is not have valid identity or not have valid certificate.
Here is the secure way. You can add any number of CA certificate that you required to identify servers. The certificate should be in “Base-64 encoded X.509 (.CER)(PEM)”
format.
Read more here.
Upvotes: 0