Skip to content

In-memory JWT setup #1178

Answered by JoviDeCroock
pattruong asked this question in Q&A
Nov 24, 2020 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

The reason your client is created twice would be StrictMode, the token-refresh gets called twice because you are calling it eagerly in your getAuth function, it seems better to only refresh your token when an error occurs or when you're sure that the token has expired.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@pattruong
Comment options

@pattruong
Comment options

@kitten
Comment options

@pattruong
Comment options

@kitten
Comment options

Answer selected by pattruong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants