Skip to content

Update the status within the client could it be fine or is it horrible? #1114

Answered by kitten
albertcito asked this question in Q&A
Discussion options

You must be logged in to vote

Depending on how you're using the credentials this will be completely fine. This obviously can't quite be a complete example but there's some assymmetry between your authorisation management in useUser and the token being retrieved from local storage.

If you already have a singleton that manages the user or a context object, you could instead investigate using the authorisation exchange instead: https://formidable.com/open-source/urql/docs/advanced/authentication/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kitten
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