-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Description
When using the client.refresh() method, the access/refresh tokens are rotated but the content within the token is not refreshed. This prevents dynamic user attributes that are fetched during the initial issuer.success() method from being updated during token refresh operations (without having the user go through the authentication flow again).
Current Behaviour:
- Initial token generation in issuer.success() dynamically fetches user attributes from Redis
- Token refresh via refresh() rotates the token but preserves the original claims
Use Case:
- I'm storing some dynamic user attributes (permissions, roles, profile data) in Redis that can change independently of the authentication session. When tokens are refreshed, I'd like for these updated values to be included in the new access token to maintain accurate auth context.
I've reviewed the client documentation and don't see an existing method/flow to achieve this behaviour. I'm hoping I'm not missing some obvious solution or doing something fundamentally wrong in my approach. Any guidance would be greatly appreciated!
bodhihawken, bigbyte-dom and gabriel-richardson
Metadata
Metadata
Assignees
Labels
No labels