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

    How we can check If refresh token is expired?

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    1
    1
    1.1k
    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.
    • J
      jinalptl1993
      last edited by

      I am using fusionauth in my Next Js application.

      In my API, I am checking If the access token is expired or not. If the token is expired, I am generating a new token based on the refresh token.

      Sometimes I am facing that while renewing access token I am getting 400 so that means refresh token is expired and my API got failed and user redirected to home page suddenly.

      What I would like to check is, whenever the application gets loaded at that time check If a refresh token is valid for the next 24 hours or not. If expired then redirect to the home page else user can visit the requested page.

      Thanks a lot in advance!

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