Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

authentication from json api on Rails with Devise

I use devise and rails app for authenticate users from mobile; so the user sign up/sign in/ sign out from their mobile devices, the problem is for (sign up/sign in) so that the user send his plain text password over the wire, how can I encrypt the plain text password and decrypt it on the server side? I am very new to RoR and Devise.

like image 358
Bahador Biglari Avatar asked Feb 02 '14 01:02

Bahador Biglari


1 Answers

I'm not sure what you are trying to accomplish when you say "send plaint text password over wire" but below [1] is a good tutorial for creating a json api with devise. It uses the old token_authenticable module which has been removed from devise so follow this gist [2] to make modifications.

[1]http://lucatironi.github.io/tutorial/2012/10/15/ruby_rails_android_app_authentication_devise_tutorial_part_one/

[2]https://gist.github.com/josevalim/fb706b1e933ef01e4fb6

like image 169
LightBox Avatar answered Sep 21 '22 04:09

LightBox