FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Update JWT token

    Scheduled Pinned Locked Moved
    Q&A
    0
    2
    643
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      harish_reddy
      last edited by

      Use case:

      1. A working react application using OIDC Auth flow

      2. JWT contains some custom claims created using JWT populate lambda

      3. 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.

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        @harish_reddy

        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?

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post