Describe the bug
Using logto/node, I'm authenticating my user then attempting to get a JWT access token, so I call
const token = await client.getAccessToken(resourceUrl);
The token is successfully generated and returned, however it does not have any scopes.
Expected behavior
I believe the token should have the scopes from the options when the client is initialised, but looking at the source -
|
const { accessToken, refreshToken, idToken, scope, expiresIn } = await fetchTokenByRefreshToken( |
- it does not include scopes in this call.
I'm happy to add a PR for this, just wanted to check this was in fact a bug.
How to reproduce?
- Create a new Client from @logto/node
- Authenticate the client
- Call
getAccessToken with a resource.
Environment
Self-hosted (Docker image)
Screenshots
No response
Describe the bug
Using logto/node, I'm authenticating my user then attempting to get a JWT access token, so I call
The token is successfully generated and returned, however it does not have any scopes.
Expected behavior
I believe the token should have the scopes from the options when the client is initialised, but looking at the source -
js/packages/client/src/client.ts
Line 449 in c540dd6
I'm happy to add a PR for this, just wanted to check this was in fact a bug.
How to reproduce?
getAccessTokenwith a resource.Environment
Self-hosted (Docker image)
Screenshots
No response