I have been using rails for developing web applications and now i need to do design an api for iphone application and since i used respond to json it also produces json but i use devise for authentication in my web application and when i send email and
password along with the api it gives out
{"user":{"authentication_token":"Lsusyd27ewgasga63","email":"
[email protected]"}}
and there is forgot
password functionality in the iphone app but in the web application when clicking on forgot
password button it sends an email to the users email, whereby the user has to go to his mail and click on the link sent and it will take to the change
password path and after changing it the user will be login but in this iphone app i want to send the
password to the user mail and the user can use that
password and login. How can i do this? Also do i have to create new controllers for api or the web application controller is enough if it respond as json? please help me.