Skip to content
项目

joshsoftware/sso-devise-omniauth-provider

在 GitHub 查看

关于

一个处理单点登录(Single Sign On)的 Devise Omniauth 服务器。

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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.

This custom provider acts as an omniauth client (to connect to Twitter & Facebook) AND also acts as a omniauth provider (via auth_controller) to authenticate internal applications.

Clone this repository and do a bundle install. NOTE: We are using devise master HEAD because it has the latest omniauth integration code.

git clone git://github.com/joshsoftware/sso-devise-omniauth-provider.git
bundle install
rake db:create
rake db:migrate

Create your Twitter App and Facebook App. Create the initializer file with the following omniauth configuration:( eg. I use config/initializers/omniauth.rb )

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :twitter, 'twitter-appid', 'twitter-app-secret'
  provider :facebook, 'facebook-appid', 'facebook-app-secret'
end

That’s it! Your on your way:

rails server

In your browser, go for it:

http://localhost:3000

Please feel free to enhance this demo. For any doubts, please send an email to [email protected]

I am eager to write some rspec for this setup. If you do, please send me a pull request!

This is released under the MIT license.

探索相关项目

加载中…