No release in over 3 years
Open edX strategy for OmniAuth
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

>= 2.0
>= 1.9, < 3
 Project Readme

OmniAuth::OpenEdx

This is the OmniAuth stragegy for authenticaing to Open edX.

Note, this strategy only works with Open edX juniper release or above.

Installation

Add to your Gemfile:

gem "omniauth-open-edx"

Open edX OAuth2 Toolkit Setup

  • Go to ${LMS_URL}/admin/oauth2_provider/application
  • Add a new application
  • Enter redirect url, this depends on your setup, learn more from examples
  • Select Confidential client type, Authorization code authorization grant type
  • Get the Client id and Client secret and configure them in your ruby application

Usage

use OmniAuth::Builder do
  provider :open_edx,
           ENV["OPEN_EDX_OAUTH_CLIENT_ID"],
           ENV["OPEN_EDX_OAUTH_CLIENT_SECRET"],
           {
             scope: "profile email",
             client_options: {
               site: "https://courses.edx.org",
             },
           }
end

License

MIT License.