Open SaiMadhav9494 opened 9 months ago
tried removing the timeoutDuration
and still getting the same error.
also tried this package and getting the same error. not sure if I need to bring this up with the Auth0 community.
Any solution for this ?
same issue
I solved it by setting NODE_TLS_REJECT_UNAUTHORIZED to 0
I solved it by setting NODE_TLS_REJECT_UNAUTHORIZED to 0
just again this morning and it worked. no changes made to my app
Checklist
Description
Been using this library to validate the access tokens and recently started to get a 401 error saying
Failed to fetch authorization server metadata
.As I started to dig into the library code, found out that the
discovery
method is failing to fetch the openid and oauth configs.Note: I have verified my issuer url and seems to be good.
Pasting the error being thrown inside the catch block of the
discover
method:Assuming the time out (5000 ms) specified inside the fetch method is causing to fail and throw. Because when I have tried to fetch the openid configs using curl with the specific url
https://{issuer_base_url}/.well-known/openid-configuration
, I was able to get the configs.Reproduction
authorization: Bearer access_token
.express-oauth2-jwt-bearer
library to validate the token.async validateAuth0Token(req: Request, res: Response) { const validateToken = promisify( auth0({ issuerBaseURL: ISSUER_BASE_URL, audience: AUDIENCE, tokenSigningAlg: 'RS256', }), );
}