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

Development

~> 1.0

Runtime

~> 1.3
 Project Readme

OmniAuth Zaif

This gem contains the Zaif OAuth2 Strategy for OmniAuth.

Supports the OAuth 2.0 Web Login. Read the Zaif developers docs for more details: https://corp.zaif.jp/api-docs/oauth/

Using This Strategy

First start by adding this gem to your Gemfile:

gem 'omniauth-zaif'

Next, tell OmniAuth about this provider. For a Rails app, your config/initializers/omniauth.rb file should look like this:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :zaif, "Client_ID", "Client_Secret"
end

Authentication Hash

An example auth hash available in request.env['omniauth.auth']:

{
  "provider" => "zaif",
  "uid" => "a123b4....",
    "info" => {
      "email" => "taro.yamada@example.com",
      "name" => "山田太郎",
      "kana" => "ヤマダタロウ",
      "certified" => true
    },
      "credentials" => {
        "token" => "a123b4...", # The OAuth 2.0 access token
        "refresh_token" => "a123b4...",
        "expires_at" => 1504994039,
        "expires" => true
      },
    "extra" => {}
}

Licence

MIT

Author

nori3tsu