You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an API, running on Koa (node), and using node-jwks-rsa as the provider for koa-jwt to validate my Auth0 jwt tokens. Both Auth0 and my api have been correctly configured: I've been developing on it for a while now, and it runs correctly in several deployment configurations. However, I've recently switched from a mac to a windows laptop, and decided to give WSL2 (Windows Subsystem for Linux) a go. I've since encountered a strange issue, which seems to originate in node-jwks-rsa, and have not yet discovered any workaround.
The error log:
jwks Requests to the JWKS endpoint available for the next minute: 4 +3s
jwks Fetching signing key for 'SIGNING-KEY' +0ms
jwks Fetching keys from 'my-auth0-domain/.well-known/jwks.json' +0ms
jwks Failure: Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 80,
config: {
headers: {
Accept: 'application/json, text/plain, */*',
'User-Agent': 'axios/0.19.2'
},
baseURL: 'my-auth0-domain/.well-known/jwks.json',
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 30000,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
method: 'get',
data: undefined
},
redacted the rest, request object seems fine
The error occurs in the getKeys function. The only thing I can think of is that the request seems to happen through port 80, yet my node server is running on 8080. Since this is the default http port, I think it's working as intended, but worth mentioning.
The issue occurs on every request to the API. I've verified that all the keys, passwords and config is correct.
Reproduction
Relevant part of app.js (config is used to inject auth0 variables, which are all correct):
Closing this issue, seems like it was due to a strange conflict with Docker Desktop and WSL2. Shortly after posting, curl commands started failing. Did a restart, and the Ubuntu distro was completely bugged out. A quick reinstall later and everything is running smoothly. Urgh.
Description
I'm working on an API, running on Koa (node), and using node-jwks-rsa as the provider for koa-jwt to validate my Auth0 jwt tokens. Both Auth0 and my api have been correctly configured: I've been developing on it for a while now, and it runs correctly in several deployment configurations. However, I've recently switched from a mac to a windows laptop, and decided to give WSL2 (Windows Subsystem for Linux) a go. I've since encountered a strange issue, which seems to originate in node-jwks-rsa, and have not yet discovered any workaround.
The error log:
The error occurs in the getKeys function. The only thing I can think of is that the request seems to happen through port 80, yet my node server is running on 8080. Since this is the default http port, I think it's working as intended, but worth mentioning.
The issue occurs on every request to the API. I've verified that all the keys, passwords and config is correct.
Reproduction
Relevant part of app.js (config is used to inject auth0 variables, which are all correct):
Environment
Node: v12.18.2
Koa: v2.11.0
koa-jwt: v4.0.0
jwks-rsa: v1.8.0
Running on:
Windows version 2004 (OS Build 20170.1000)
with Ubuntu-20.04 through WSL2
Thanks in advance for any help regarding this issue.
The text was updated successfully, but these errors were encountered: