Skip to content

(Implemented)Token Refreshing #1733

Answered by JClackett
Rykuno asked this question in Q&A
Dec 22, 2021 · 3 comments · 8 replies
Discussion options

You must be logged in to vote

@Rykuno I've pushed a commit to develop for refresh tokens, have a look and let me know what you think!

At the moment I've set the app token to expire in 1 minute and the refresh for 4 weeks.

However, something I realised when building it: the whole refresh token flow will only run when a mutation or a query throws an Unauthenticated error. So there's potentially a weird behaviour that occurs if a user logs in and then just sits on the homepage and refreshes the page, the app token would expire after 1 minute and the user will be logged out, because it never threw a Unauthenticated error, because they never hit "authenticated" queries/mutations.

This is obviously a bit of a weird edge cas…

Replies: 3 comments 8 replies

Comment options

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

@Rykuno
Comment options

Comment options

You must be logged in to vote
1 reply
@JClackett
Comment options

Comment options

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

@JClackett
Comment options

@Rykuno
Comment options

@JClackett
Comment options

@Rykuno
Comment options

Answer selected by Rykuno
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