I am using custom authentication in my flutterflow app, then to refresh the tokens I have used interceptor function , which is working a 100%, I can avail its functionality when I am using the app, like it refreshes the token properly when they get expired based on the auth token expiry variable from the authenticated user object, keep in mind that the global variable "isUserLoggedIn" is true at that time(here I am using accessing and updating the authenticated users object inside the interceptor's custom code), but the problem is when I restart the app, if the auth token expiry time has passed flutterflow automatically sets the isUserLoggedIn variable to false, as well as considers the user logged out, so although an api call on app restart is causing the interceptor to bring me a new token, it is not getting stored in the authenticated user's object, because flutterflow is not allowing it to do so, and throwing an exception like such
unable to update authenticated user's data on app restart if token expires in custom authentication
Actions & Logic
Resolved
I have tried to call the refresh token api manually as well on app restart, which is working fine as well but the update authenticated user action doesn't seem to work at all, in the above scenario's later part.
Yes
2
4 replies