A Rails Engine providing an Omniauth provider with single sign on features in a minute.

Based on Devise, Authentifyd and joshsoftware/sso-devise-omniauth-provider. Parts directly taken from github.com/joshsoftware/sso-devise-omniauth-provider

See sso_clyent for the client part.

Uses Authentifyd

Devise + Omniauth Authentication encapsulated in an Engine

Installation

  • gem ‘sso_provyder’

  • rake sso_provyder:initialize

  • rake sso_provyder:install:migrations

  • rake db:migrate

  • in config/routes.rb add:

    * mount SsoProvyder::Engine => "/#{your root for sso_provyder}"
    * you can also configure Authentifyd::Engine root inside SsoProvyder::Engine by defining SsoProvyder.authentifyd_path in an initializer file. (default to aut/ => sign_in_path = /#{your root for sso_provyder}/aut/users/sign_in)
    * NB: don't mount Engine on root "/". This could be a feature added in the future but for the moment this possibility is not implemented.
    
  • Configure Devise: copy paste raw.github.com/plataformatec/devise/master/lib/generators/templates/devise.rb in config/initializers/devise.rb. Edit it.

    • NB: set “config.pepper”.

      ex: require 'securerandom' -> SecureRandom.hex(64)
      
  • Add Facebook and Twitter config files

    • Example

      staging:
        app_id: APP ID FOR STAGING ENV
        app_secret: APP SECRET FOR STAGING ENV
      development: &development
        app_id: APP ID FOR DEV ENV
        app_secret: APP SECRET FOR DEV ENV
      test:
        <<: *development