Omniauth::Strategies::CentralLogin

An article, posted about 3 years ago filed in devise, gem, authentication, openid, oauth, CentralLogin & login.

I just pushed omniauth-central_login to rubygems.org, to make it easy to integrate CentralLogin with other ruby apps. It is a companion gem to CentralLogin, a batteries included open source OAuth2 Provider based on Rails, Doorkeeper & Devise, with simple user managment tools.

Installation

Add this line to your application’s Gemfile:

ruby gem 'omniauth-central_login'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install omniauth-central_login

Usage

Configuring Omniauth:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :central_login, ENV['CENTRAL_LOGIN_CLIENT_ID'], ENV['CENTRAL_LOGIN_CLIENT_SECRET'], {
    scope: "openid email profile",
    client_options: {
      site: ENV['CENTRAL_LOGIN_URL']
    }
  }
end

Configuration for Devise (using omniauthable):

config.omniauth :central_login, Rails.application.secrets.central_login_id, Rails.application.secrets.central_login_secret, {client_options: {site: Rails.application.secrets.central_login_site}, scope: "openid email profile"}

Enjoy.

Op de hoogte blijven?

Maandelijks maak ik een selectie artikelen en zorg ik voor wat extra context bij de meer technische stukken. Schrijf je hieronder in:

Mailfrequentie = 1x per maand. Je privacy wordt serieus genomen: de mailinglijst bestaat alleen op onze servers.