-
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
(Hello, me again 😅)
I'm getting a bit stuck rolling out an OAuth2 implementation built upon this library. On the OAuth2 flows side of things, all is well mostly thanks to cribbing bits I didn't understand from the docs from the example/ directory.
However, not present in the example is the recommended way to use the generated Access Tokens to actually authorise requests to other private endpoints.
Without this, I have these assumptions / questions:
- I guess I should be using
JwtServiceto verify the JWT and decode its contents? But that's stateless so the token could have been revoked... - So I guess I should also be calling
OAuthTokenRepository.getByAccessTokento confirm the token is not revoked? - I was kind of expecting the library to expose a convenient API to do a lot of this for me, e.g.
authorizationServer.verifyToken(accessToken: string): Promise<OAuthToken>, but it seems this is up to the User?. I've providedAuthorizationServerall these repositories and a custom JWT service, why do I have to string them back together on the middleware side of things?
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation