Keep user logged in

What flow do you use to keep your user log in in the mobile app?
currently i am passing the token that is store as an app variable when user signups / log in which triggers dismiss initial view and have the function retrieve user id from the backend to check if token is working to also skip dismiss initial view. However it seems that variable app are cleared which is each app open? how can I then keep the user logged in?

Did you check out this discussion already?

Also I save the refresh token in storage (on the device); this way it stays available even when the appVars reset:

If you are using the Firebase nodes by Appgyver and email/pass auth, it should be like that natively. On a global canvas logic page, there’s a node “Initialize Firebase”, just put there a delay of 500ms and then Get current user. If there’s a session stored on the device, the app will now and load up this user.