Update JWT token
-
Use case:
-
A working react application using OIDC Auth flow
-
JWT contains some custom claims created using JWT populate lambda
-
Server updates some user attributes in fusionauth using API
React application has to wait the token expiry period to have these new user attributes in JWT
Is there a mechanism in fusionauth to force update the JWT from client to re-run populate lambda function and issue a new token.
-
-
You are asking if there is a way for the client to somehow know the user's account on the server has been modified and therefore refresh the JWT? I suppose you could have the server somehow push info to the client using something like websockets.
Or are you asking if the client can check every so often and refresh the JWT even before it is expired? In this case, you could shorten the lifetime of the JWT, or just refresh the JWT periodically using this API: https://fusionauth.io/docs/v1/tech/apis/jwt/#refresh-a-jwt
Or am I misunderstanding the question?