TagoLine 0.1.4.10 → 0.1.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ded2adbf631b7a44f828c4c8d16c3401e81238e1cb06f22714823c2f8fb4a20e
4
- data.tar.gz: a7950cfae22ea9668727928b4bf0251df6a058f3082ddb51cb2125d487322668
3
+ metadata.gz: 2b44b1562e4fdab2342d5484cadbd85d74ff301ec0b7a4c46b563a095cd0343b
4
+ data.tar.gz: 89f744db564ee2dfec4e03da8770dda1fcbced8932f78c6096179993024c36ca
5
5
  SHA512:
6
- metadata.gz: ae11825b10c93bf52f56744c7c475c581644d01ceb6121186667c1ae3645384b28eb2e520572a0004bb655792b344ad976b4a113a79ddc30eea606b48a854b34
7
- data.tar.gz: 95b9ae6e509ba16524db0fa972ff40bb412d950ef4cabc455de8a0b780c2b78ed2438face18984122958680c72c6a871bd16d4fc5e5fcf07aac5d941c5d1e3c9
6
+ metadata.gz: a5c399fd753951ba96cd805fe55a0e5a708e24a3c98fa738f5888d197bceb0e050ba624e3a152f132bc290e71838467b5de91a993449ccc5c5cfd3022d478a43
7
+ data.tar.gz: 55f717d9a261577c44b9708a5a1b69afc7e133850d840e3a8a4168adb5377d8f8b60aee77dfe356fea81c7fb22fea21cc12f9db74825b0b2ae1e5b6065c5619c
@@ -4,14 +4,11 @@ require 'rails/all'
4
4
  module TagoLine
5
5
  class LoginButton
6
6
 
7
- def self.showSession()
8
- controller = ActionController::Base.current
9
- controller.session[:test] if controller
10
- end
11
-
12
- def self.show()
7
+ def self.show(controller)
8
+ line_state = ('a'..'z').to_a.shuffle[0..7].join
9
+ controller.session[:line_state] = line_state
13
10
  text = buttonStyle()
14
- text+="<a class='line_login_button' href='https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id="+ENV["LINE_CHANNEL_ID"]+"&redirect_uri="+ENV["LINE_CALLBACK_URL"]+"&state=12345abcde&scope=profile%20openid%20email&nonce=09876xyz'></a>"
11
+ text+="<a class='line_login_button' href='https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id="+ENV["LINE_CHANNEL_ID"]+"&redirect_uri="+ENV["LINE_CALLBACK_URL"]+"&state="+line_state+"&scope=profile%20openid%20email&nonce=09876xyz'></a>"
15
12
  text.html_safe
16
13
  end
17
14
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TagoLine
4
- VERSION = "0.1.4.10"
4
+ VERSION = "0.1.4.11"
5
5
  CALLBACK_URL = ENV["LINE_CALLBACK_URL"]
6
6
  CHANNEL_ID = ENV["LINE_CHANNEL_ID"]
7
7
  CHANNEL_SECRET = ENV["LINE_CHANNEL_SECRET"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TagoLine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.10
4
+ version: 0.1.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - manatago