Skip to content
Discussion options

You must be logged in to vote

@jonsgreen
The option to manually refresh access tokens has now been added in version 1.24.0.
We also modified the check for expired tokens, so when the javascript thread "wake-from-sleep" it will catch and refresh the token almost immediately (as opposed to "within 15sec").

A quick example:

  const { token, refreshAccessToken } = useAuthContext()

  return (
    <>
      <button onClick={() => refreshAccessToken()
          .catch((err) => alert(`Failed to refresh access token: ${err.message}`)
        )}>
        Refresh access token
      </button>
    </>
  )

Replies: 6 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@sebastianvitterso
Comment options

@Ma-ve
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@soofstad
Comment options

@hridaya2004
Comment options

@bhattadp
Comment options

@anijoeroy
Comment options

@soofstad
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sebastianvitterso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants
Converted from issue

This discussion was converted from issue #214 on March 06, 2025 09:53.