When the user reopens the app go to the login screen (or some other intermediary screen), if there is a token in local storage automatically run a check against your server for the token + username, if the session is valid redirect (using setRoot) to the main app page, otherwise stay on the login page.
Set the root page to the login page, or some other page if you prefer, and handle the logic for checking then changing the root page there. So in login.ts not app.ts - you might be tempted to do the check in app.ts and set the initial root page according to the result, but asynchronous calls don’t play nicely with setting the root page that way.
Ahhhh, that makes sense … so if i had a ‘profile’ page that can only be accessed if the user logged in, would i need to secure that page as well some how, or would the login check take care of any redirects?