Looking for correct way to implement Single Sign On in your Rails 4 application? There are multiple ways and things are getting especially tricky when you want to use multiple providers for single user account (facebook, twitter, ...)
Always use existing gems. Good ones are:
If you are looking for working solution, try following Kam Low's manual for Rails 4 SSO.