Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shmokmt/omniauth-line
Fork of https://github.com/kazasiki/omniauth-line
https://github.com/shmokmt/omniauth-line
Last synced: 9 days ago
JSON representation
Fork of https://github.com/kazasiki/omniauth-line
- Host: GitHub
- URL: https://github.com/shmokmt/omniauth-line
- Owner: shmokmt
- Created: 2021-03-08T07:01:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-03-09T07:15:32.000Z (over 3 years ago)
- Last Synced: 2023-03-06T05:21:40.519Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OmniAuth Line
[![test](https://github.com/shmokmt/omniauth-line/actions/workflows/ruby.yml/badge.svg)](https://github.com/shmokmt/omniauth-line/actions/workflows/ruby.yml)This gem contains the Line OAuth2 Strategy for OmniAuth.
Supports the OpenID Connect Web Login. Read the Line developers docs for more details: https://developers.line.me/en/docs/line-login/web/integrate-line-login/
## Using This Strategy
First start by adding this gem to your Gemfile:
```ruby
gem 'omniauth-line', :github => 'shmokmt/omniauth-line'
```Next, tell OmniAuth about this provider. For a Rails app, your `config/initializers/omniauth.rb` file should look like this:
```ruby
# PROFILE permission required!!
Rails.application.config.middleware.use OmniAuth::Builder do
provider :line, "Channel_ID", "Channel_Secret"
end
```## Authentication Hash
An example auth hash available in `request.env['omniauth.auth']`:```ruby
{
:provider => "line",
:uid => "a123b4....",
:info => {
:name => "yamada tarou",
:image => "http://dl.profile.line.naver.jp/xxxxx",
:description => "breakfast now.",
},
:credentials => {
:token => "a1b2c3d4...", # The OAuth 2.0 access token
:secret => "abcdef1234"
},
:extra => {
# nil
}
}
```## Supported Rubies
OmniAuth Line is tested under 2.7 and 3.0.