0

I am developing an web app that will be used by iphone app. I use devise as authentication and i can create a new user, login as the user and when login is done it gives out

{"user":{"authentication_token":"xxxxxxxxxxxxxxxxxx","email":"sample@example.com"}}

but how can i change the password using json.

logesh
  • 2,572
  • 4
  • 33
  • 60
  • Can you be more clear. What you are trying to do. Are you building an api that will be used by Iphone and in that app you want to add a feature of changing password or is it something else ? – Abhay Kumar Sep 17 '12 at 12:05
  • yes, you are right I am trying to add the change password feature – logesh Sep 17 '12 at 12:07
  • Make sure that you have enabled token_authenticatable in the user model and Read through [this](https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-password]) article – Abhay Kumar Sep 17 '12 at 12:20

1 Answers1

0

Most likely you will need to build an API for this, utilizing Devises JSON (Warden) to respond to JSON etc

reference to help point you in the right direction creating sessions with devise

Searching SO also yields Ajax login with devise

Community
  • 1
  • 1
TheIrishGuy
  • 2,531
  • 19
  • 23