No commit activity in last 3 years
No release in over 3 years
`omniauth-cognitiveclass` is a strategy (plugin or extension) for OmniAuth, which is a Ruby authentication library. OmniAuth integrates transparently with Devise, a popular Rails authentication solution. [Cognitive Class](https://courses.cognitiveclass.ai/) is also known as Big Data University. It's based on the OpenEdx platform
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 12.0
~> 3.4
~> 0.46
~> 0.12

Runtime

 Project Readme

omniauth-cognitiveclass

omniauth-cognitiveclass is a strategy (plugin or extension) for OmniAuth, which is a Ruby authentication library. OmniAuth integrates transparently with Devise, a popular Rails authentication solution.

Cognitive Class is also known as Big Data University. It's based on the OpenEdx platform

Usage with Devise

Add this to your Gemfile:

gem "omniauth-cognitiveclass", "~> 0.4.0"

Install the gem:

bundle install

Define these environment variables for your Ruby application:

export COGNITIVE_SITE="https://courses.cognitiveclass.ai/"
export COGNITIVE_AUTHORIZE_URL="https://courses.cognitiveclass.ai/oauth2/authorize"
export COGNITIVE_TOKEN_URL="https://courses.cognitiveclass.ai/oauth2/access_token"

export COGNITIVE_ID="..."
export COGNITIVE_SECRET="..."

export MY_ORIGIN="http://example.com:3000"

Add this to your config/initializers/devise.rb:

require "omniauth_cognitive_class"

callback_url = "#{ENV.fetch('MY_ORIGIN')}}/users/auth/bdu/callback"

config.omniauth :cognitive_class, ENV.fetch("COGNITIVE_ID"), ENV.fetch("COGNITIVE_SECRET"),
  callback_url:           callback_url,
  provider_ignores_state: true,
  strategy_class:         OmniAuth::Strategies::CognitiveClass

Follow the other steps from the Devise OmniAuth Guide.

See Also