不知道有没有人用过这个 https://github.com/joshsoftware/sso-devise-omniauth-provider
Single Sign-On using Devise and Omniauth
We wanted to solve these problems:
A single User Manager application (which will authenticate ALL users with different roles)
Different internal applications which talk to User Manager for authentication
User should be able to login/sign-up via Social Networks like Twitter and Facebook.
Single Sign On between all applications.