0.0
No release in over 3 years
Low commit activity in last 3 years
Le Wagon's alumni platform provides OAuth capabilities for the ecosystem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

OmniAuth::Kitt

Provides an OAuth connection for Le Wagon alumni.

Usage with Devise

Add this line to your application's Gemfile, then bundle install:

gem 'omniauth-kitt'

Go to kitt.lewagon.com/oauth/applications and create a new application.

Callback URL will be http(s)://HOST/users/auth/kitt/callback

Devise.setup do |config|
  config.omniauth :kitt, APP_ID, SECRET

  # [...]
end

Your User model needs this line:

class User < ApplicationRecord
  devise :omniauthable, omniauth_providers: [ :kitt ]

  # [...]
end

And your controller:

class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
  def kitt
    auth = request.env["omniauth.auth"]
    # [...]
  end
end

auth has the following keys:

  • id as an integer
  • github_nickname as a string
  • email, first_name, last_name & avatar_url as strings
  • admin as a boolean
  • cities as an array of slugs (City managers)