Reputation: 11747
I have a app I need to add to it a login system. In the main screen I want to have the log-in form with mail and password.
I already have a back-end, a rails 3 server. I know there already are some authentications gems I could use, but I'm kind of lost of how to work with the app and the backend.
Of course I need to make post calls to create the user from the mobile to the server but how do I encrypt the password?! I can't send the password in plain text because anyone sniffing the wifi would be able to just read the password and the email... how do I solve this?! The same when I check if the user exists or not, I can't send the password in plain text to be checked by the server...
Do I roll out my own registration form or I use devise and that kind of gems? Is there a gem to support "REST authentication"?
Any help would be awesome! Thanks!
Upvotes: 1
Views: 310
Reputation: 2584
You can post to the backend the same way the devise system posts to the backend via HTTP POST.
The best way to handle security is to have this encrypted using HTTPS. This is the accepted practice for websites as well.
Upvotes: 2