Rails API : Best way to implement authentication?

前端 未结 4 1914
清酒与你
清酒与你 2020-12-12 17:35

I\'m writing a Rails 4 app that will expose an API for a mobile app that\'s yet to be developed. Users will authenticate using an e-mail and password from the mobile app.

4条回答
  •  情话喂你
    2020-12-12 18:32

    @Roma149 this is more of a personal preference but most people who are just starting out use Devise as it is the easiest IMO. OAuth2 is a good option as well. As a more important note you can always go to The Ruby Toolbox

    There is a lot of good information on gems there and they even tell you the age and the popularity of the gem. This will also allow you to differentiate between what gems the community is really geeking out on now or what has gone stale.

    Remember in Ruby and Ruby On Rails it is not always what is better gem wise but what best fits your project!

提交回复
热议问题