Reputation: 2251
I write a application (social network like Twitter) and first thing I write is login function.
In server side I use Nodejs, Expressjs and Mongoose to create RESTful web service handle request but I don't know when user login (from Android application) how to save the cookie to this device, and after that if they already logged in, how to check them first before they can post a tweet or comment.
I want to know about how to save cookie or something like that and how to check it already login or not before send post get put request to server.
My ideal is: in Android app (Phonegap) send encrypt (user+pass+secretkey) and server respond with a JSON message success or fail. I don't know how that would work.
Upvotes: 0
Views: 292
Reputation: 17803
learn more about what sessions and cookies are and use http://passportjs.org/ for easy authentication
Upvotes: 2