Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to fetch jwks in node V20 #159

Open
hbc19 opened this issue May 16, 2024 · 1 comment
Open

Not able to fetch jwks in node V20 #159

hbc19 opened this issue May 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@hbc19
Copy link

hbc19 commented May 16, 2024

Question
How can we help you?
I am facing issue while fetching jwks from cognito in version 20 of nodejs. On version 16 and 20 it is working fine but gets timeout on 20.
Any reasons why?

Error:
FetchError: Failed to fetch https://cognito-idp.<region>.amazonaws.com/<userpool>/.well-known/jwks.json:

Note: I have replaced region with and userpool id with in above error.

Versions
Which version of aws-jwt-verify are you using?
4.0.1
Are you using the library in Node.js or in the Web browser?
Node.js
If Node.js, which version of Node.js are you using? (Should be at least 14)
v20.11.0
If Web browser, which web browser and which version of it are you using?
N.A.
If using TypeScript, which version of TypeScript are you using? (Should be at least 4)
5.3.3

@hbc19 hbc19 added the question Further information is requested label May 16, 2024
@ottokruse
Copy link
Contributor

Should just work, have used the lib many times on Node.js 20 although maybe not your exact version. You can increase the response timeout (see README) to test if that solves it but it should just be fast and I suspect the issue is elsewhere (eg no internet). Can also try to make another http fetch call in your code and see if that does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants