We are building a mobile app, specifically an android app, and it needs to connect to the server to get data. It is not like twitter, we do not need to expose some kind of public apis. We just need to keep it simple and safe because user will exchange some private data with the server.
My questions is mainly on authentication. Our server will have a user database.
- How to register and login in my mobile app ? What kind of mechanism should be implemented in the server side and the client side.
- How to keep the session after login?
- If I need to let user could login without input his username/password next time when he open the app, What should I do? I just think to store his password in the mobile client is not a good idea.