Jwt Flutter Authentication flow
3,905
Save the token in your local storage and use background_fetch to check the token expiration date (timestamp) after decoding it with this simple snippet code. If time the token is expired the call refresh_token api url
Author by
Preethi R
Updated on November 24, 2022Comments
-
Preethi R over 1 year
I am trying to create a Flutter application with Jwt token authentication. I have referred this article as a starting point. But I want to refresh the tokens on like 15 minutes. So I don't think this article makes sense and also I want to add state management to this as well. I was thinking about Bloc or provider. Some help with implementing this.