Skip to content

Help: New Access token isn't used after refresh token #192

Answered by soofstad
NiallWalshRAM asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @NiallWalshRAM
I believe what is happening that the "setInterval" or similar you are using to regularly fetch "accounts" are not properly setup to reuse the new token value.
For example this code that replaces the "interval" function when any dependent variables update.

  useEffect(() => {
    const interval = setInterval(() => doAPICallRegulary(token))
    return () => clearInterval(interval)
  }, [token]) 

Could you please provide a full example of all involved functions and classes?

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by soofstad
Comment options

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

This discussion was converted from issue #190 on October 15, 2024 11:16.