I'm building my first mobile app in which users can login. My app talks to webservices on my site's backend. Users can login via either Facebook or an email/password combination.
I'm used to ASP.NET forms authentication for my website, but for mobile apps: what is the adviced way of storing the logged in status?
How do apps like Facebook/Uber/Gmail do this?
Validate on every request? Is there a timeout which is kept on the server (e.g. with 60 minutes of inactivity require re-login).
Or is there simply a local cookie in which a flag loggedin=true
is set and the users' username is stored? (possibly again with a timeout)?