I've tried to find an answer to this question for a while now, but my efforts have been fruitless. I've found several articles and questions about offline authentication, but these are mainly concerned with storing login credentials locally after a user has already logged in once online.
The reason I want to implement such a system is because certain groups should have access to my applications for free, whereas others which do not fall under these groups should have to pay in order to use these applications. To my knowledge this is not something that is supported by the app store. Additionally eventually the series of applications should support other devices, so it makes sense to have a common login service.
These applications don't need resources from a server. The server is used merely for authenticating the user.
When a user launches an app they must log in before they can use the app. The authentication takes place on a server and is already sorted. The question is how I can restrict use of the application, which is already installed on the device by the time the user is prompted log in. If this were a web application I would store a session cookie which is then used whenever a resource is requested. In my case all resources are already on the device, so if someone is stubborn enough they will be able to use the application without logging in first, but I don't want this to be too easy. If there is some offline equivalent of a session cookie that I can use to verify that the user has logged in as the app is being used that would be ideal. I'm not storing any sensitive information in the applications nor would it be a catastrophe if someone were to gain access without first logging into an account, but I would like to know if there is a good way to solve this problem.
- When users launch my applications they should be prompted to login
- After logging in users should be able to use the application, and it shouldn't be too easy circumvent the log-in process
I'm not asking for details, but I've hit a dead end and would like to know about any technologies or techniques that might help.