Can you give me some information on how the user login process works? I want to create a mechanism or JS function that can validate that a user is logged on. Right now my login_service is returning the session token to a localStorage variable. On page load I can check that variable (!mySessionToken) then {} but how can I validate is that session token is valid? Does it expire? I want users to be logged in as many of the things they do revolve around their users account. I don't want them to have to relogin repeatedly but want to have a way to validate the person is an active logged in user.
For example, if a user logs into my app and it is successful, it will bring them to the homeScreen. If it fails it will give them an error message. if they are inactive in the app for xDays when they open the app again how can I validate that they are a true user and their token is active?