0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
OAuth2 OmniAuth strategy for Code School
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 2.3.0

Runtime

 Project Readme

oa-codeschool

A backward-compatible OmniAuth gem strategy for Code School.

There a new omniauth-codeschool gem but it requires OmniAuth 1.x and above. This strategy is compatible with OmniAuth 0.2.x which we still use in older apps.

Installation

Add this line to your application's Gemfile:

gem 'oa-codeschool'

And then execute:

$ bundle

Or install it yourself as:

$ gem install oa-codeschool

Usage

In your config/initializers/omniauth.rb :

Rails.application.config.middleware.use OmniAuth::Builder do
  provider OmniAuth::Strategies::CodeSchool, 'client_id', 'client_secret'
end

By default, the base_uri for code_path is set to http://localhost:3000. In different environments you may want to change it:

OmniAuth::Strategies::CodePath.base_uri = "http://codepath.com"

Then all you have to do is redirect the / link to /auth/code_school and OmniAuth will take care of the rest

Contributing

See CONTRIBUTING.md.

License

See [LICENSE][LICENSE].