Passportist

Add it to your Gemfile

gem 'passportist', github: 'evrone/passportist'

You should have those attributes in your User model: uid, token, email, name, and nickname. After that, add this line to your user.rb file:

attr_accessible :uid, :token, :email, :name, :nickname, as: :passportist

Please, use this as: :passportist for better security.

Add this to your config/routes file:

mount Passportist::Engine, at: '/passportist'

Then create an initializer in config/initializers/passportist.rb:

Passportist.access_token = 'YOUR VERY SECRET ACCESS TOKEN'

And that's it! You should create a new application at http://passport.evrone.ru now.

For authentication through Passport use something like this:

= link_to 'Sign in', 'http://passport.evrone.ru/authenticate'

You can use button_to, too: we can get both GET and POST for this route.