How can I set the time after which the session should expire? From mobile app, session shouldn't expire and if user has logged in from web, then it should expire in a day.
For the normal web app, you can set it in the config/session.php file but for the mobile app, you have to set the token expiration for the API. (I am assuming you are using an API of the same web app for the mobile version).
@Ruffles How can I set the token expiration for the API? Is this the right approach or do I have to login whenever the session is expired by passing user credentials?
I don't know how your API was implemented so if it's token-based authentication, there should be a method which sets the expiration date and that means, it will ask the user to login again.
I didn't know about token based authentication. I should start implementing it for restful APIs. Currently, I was trying by using Oauth authentication and checking user by auth methods on each request.