Giter Site home page Giter Site logo

delejnr / sso-devise-omniauth-provider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshsoftware/sso-devise-omniauth-provider

0.0 2.0 0.0 234 KB

A devise Omniauth server which handles Single Sign On

Home Page: http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/

License: MIT License

sso-devise-omniauth-provider's Introduction

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.

The Custom Provider

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.

Usage

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

Contributions

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!

License

This is released under the MIT license.

sso-devise-omniauth-provider's People

Contributors

gautamrege avatar brockgr avatar natebird avatar robzolkos avatar abepetrillo avatar herrbeesch avatar panupan avatar

Watchers

James Cloos avatar Bamidele Eribo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.