The essential boilerplate to authenticate users on your React-Native app
Alexis Mangin

I find it odd that you hardcode the refresh interval in your client code. Shouldn’t the refresh call happen as a result of a 401 status code? I realize that this would complicate things quite a bit, having to replay the previously failed action after the refresh, but it seems like the only proper solution. Only then your app will keep working when the server chooses to lower it’s expiration time. What do you think? Any pointers on how to tackle this maybe?

Like what you read? Give Thijs Koerselman a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.