Gets the access token data for the specified user.
The ID of a user whose token is being requested.
Optional
scopes: string[]An optional list of required scopes to validate against the token's current scopes.
UnregisteredUserError if the user is not registered with this provider.
MissingScopeError if the token does not include the required scopes.
Retrieves the scopes currently associated with the specified user's access token.
Returns an empty array if no scopes were set during user registration.
The ID of a user whose scopes should be retrieved.
UnregisteredUserError - Thrown if the user is not registered with this provider.
Optional
refreshRefreshes the user's access token.
The ID of a user whose token should be refreshed.
Authentication provider that manages user access tokens.
Remarks
This interface can be implemented in various ways. Two built-in implementations are provided:
If these implementations are not sufficient for your use case, you can create a custom one. For example, you could store and manage authentication data in Redis to share it between multiple processes or containers.