Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
OmniAuth 1.0 strategy for KhanAcademy
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
CHANGELOG.md
Gemfile
LICENSE
README.md
Rakefile
omniauth-khan-academy.gemspec

README.md

OmniAuth Khan Academy

This is an OmniAuth 1.0 strategy for authenticating to Khan Academy.

Installation

Add this line to your application's Gemfile:

gem 'omniauth-khan-academy'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-khan-academy

Usage

Register[http://www.khanacademy.org/api-apps/register] your app at Khan Academy and get your consumer token and secret.

In a Rack application:

use OmniAuth::Builder do
  provider :khan_academy, CONSUMER_TOKEN, CONSUMER_SECRET
end

For Rails, put this in your omniauth configuration file:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :khan_academy, CONSUMER_TOKEN, CONSUMER_SECRET
end

Restart the server and visit "*/auth/khan_academy" to try it out.

The default callback is routed to "*/auth/khan_academy/callback" but you can override it as shown:

provider :khan_academy, CONSUMER_TOKEN, CONSUMER_SECRET, callback_url: "my_callback_url"

Author

Dipil Saud (@dipil-saud)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.