I am trying to understand how to implement JWT token authentication in my app.
As I understand, user inputs credentials (user+password) in login request and receives both Access token (say 30 mins) and Refresh token (say 60 days).
Whenever Access token expires, I will use username+refreshtoken to create a new Access token.
1) First question: is it normal that whenever this happens, all my home screen requests will fail until I get the new content and then I will need to re-send the requests with the new access token?. Or should I do the token validation in a splash screen before any other app flow?
This will continue until 60 days pass and refresh token expires. ¿ What happens here?
I don't recall ever facebook or (almost) any app requesting my credentials again.
2) Is the password stored so that app can do a background login again to retrieve both tokens? (I don't want to store password in any way)
-
3) Or is the refresh-token refreshed someway before it expires? (for example it is refreshed as long as user keeps opening the app before 60 days)