Omniauth Hatena
A Strategy to auth with Hatena in OmniAuth.
Get your ConsumerKey here:http://developer.hatena.ne.jp/ja/documents/auth/apis/oauth/consumer
Usage
Add this line to your app's Gemfile
:
gem 'omniauth-hatena'
And add the following to your config/initializers/omniauth.rb
:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :hatena, "consumer_key", "consumer_secret"
end
You can specify scope like the following
Rails.application.config.middleware.use OmniAuth::Builder do
provider :hatena, "consumer_key", "consumer_secret", :scope => "write_public, read_private"
end
Regardless of what you specify, scope contains "read_public" automatically.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request