Extending Devise SessionsController to authenticate using JSON

后端 未结 7 1313
面向向阳花
面向向阳花 2020-12-04 05:14

I am trying to build a rails API for an iphone app. Devise works fine for logins through the web interface but I need to be able to create and destroy sessions using REST AP

7条回答
  •  伪装坚强ぢ
    2020-12-04 06:11

    I solved the problem by creating a small service that dispenses authentication tokens. I wrote a blog post about it: http://matteomelani.wordpress.com/2011/10/17/authentication-for-mobile-devices/. You can also get the code here: https://github.com/matteomelani/Auth-Token-Service-Prototype.

提交回复
热议问题