First time playing around with Remix. I’ve created my first app yesterday and I am trying to figure out how to manage my Auth state:
- I have a backend server that allows me to log in: it returns a JWT access token that is valid for a couple minutes and a refresh JWT token that is valid for a couple days.
What is the best practice when it comes to logging in with Remix, storing the AccessToken & refreshToken.
I also want to make sure that if the token is expired that I automatically refresh it without having to put that logic in each authenticated component.
Could you help me?