I am trying to migrate authentication via auth0 from a jvm based solution which uses auth0 rest api to a node based solution using node-auth0.
At present its a 2 step process:
- Get token via POST /oauth/token
- Get user profile via /userInfo using the token obtained in step 1
In the node application, I am constructing
AuthenticationClient while providing
AuthenticationClientOptions and able to get the token successfully using
passwordGrant but when I use the same
authenticationClient object to call
getProfile while providing the token obtained from passwordGrant, I get this error:
Request failed with status code 401
What’s confusing is that in Auth0 dashboard, this request is successful.
This suggests that the error is from the library.
I am new to the whole node ecosystem in general. Any help is highly appreciated.
Please include the following information in your post:
- Which SDK this is regarding: node-auth0
- SDK Version: 2.42.0
- Platform Version: Node 15.14.0
- Code Snippets/Error Messages/Supporting Details/Screenshots:
Error: Request failed with status code 401
Is this a feature request or bug report? If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.