This is pretty much my entire request
await axios.get(
{
url: process.env.AUTH0_AUDIENCE + `users/${user.sub}`,
headers: {
'Authorization': `Bearer ${process.env.AUTH0_TOKEN}`,
'Content-Type': 'application/json'
}
}
)
I’ve made sure the following information is correct
The user.sub is literally the user object’s sub property
the auth0_token is correct (copied from the test page and was working previously)
AUTH0_AUDIENCE is the address of my api
every time I try to make this request I get a very long network error that amounts to
cause: AggregateError
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5) {
code: 'ECONNREFUSED',
[errors]: [
Error: connect ECONNREFUSED ::1:80
at createConnectionError (node:net:1634:14)
at afterConnectMultiple (node:net:1664:40) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 80
},
Error: connect ECONNREFUSED 127.0.0.1:80
at createConnectionError (node:net:1634:14)
at afterConnectMultiple (node:net:1664:40) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 80
}
]
}
I’ve tried adding the auth0 api domain to my allowed CORs origins and I added http://127.0.0.1:80 and http://localhost:5000 to my allowed Cors and allowed web origins in my auth0 application (not sure if that would do anything because 127.0.0.1 is an internal address) there doesn’t seem to be any option to update the CORs origins in the API config for auth0.
It seems to me this isn’t an authentication issue or an error in my code auth0’s firewall is just straight up throwing out the request and I’m not sure what I can do to fix it