omniauth-identitas 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d905c5187378c8e8997bc510faa17518a2dd129c
4
- data.tar.gz: 7eaa136b7a8ba97ab2fb1caccd47b4081c302115
3
+ metadata.gz: 97fc0f4ae201eedc27529ac9aba1f4a571fbc09e
4
+ data.tar.gz: 99d91f73e554c323a8d0841774607e4c7d4b977f
5
5
  SHA512:
6
- metadata.gz: 67c38ffaeefb5f4363819e183365ec3ca5420331eb16828f709a19412ef9717065eee52f52415663dacde51549f9645ea8772cff0b91e01d01d796000803562a
7
- data.tar.gz: 9f8a94efdb6377d23854a3a627c17a38676b65dd36c034746fa5705adcf272e7d5eb965e2f885a3160cd1c3ba9bff2fb47af0e69e6ee022c573432e06740439a
6
+ metadata.gz: 60ef44e07df795f118e27b91ea821e801bb6097088f98e664c5db15a629ab9910df9a876170b1afe75290e0e1323075559725d2ce9d1c8650db66eed3f19dce4
7
+ data.tar.gz: df904bb8723a4f66f0b044a683f5d6a00411df1e052b3a36b5138a28c781ec4bf35c415c8c0cbd749a12ec2c6a3a96792456fad3e366a703e7b811a2108b18b7
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Identitas
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -22,16 +22,31 @@ module OmniAuth
22
22
  }
23
23
  end
24
24
 
25
+ extra do
26
+ {
27
+ m: request.params["m"]
28
+ }
29
+ end
30
+
25
31
  def raw_info
26
32
  @raw_info ||= access_token.get('/v1/me.json').parsed
27
33
  rescue ::Errno::ETIMEDOUT
28
34
  raise ::Timeout::Error
29
35
  end
30
36
 
31
- # https://github.com/intridea/omniauth-oauth2/issues/81
37
+ # # https://github.com/intridea/omniauth-oauth2/issues/81
32
38
  def callback_url
33
- full_host + script_name + callback_path
39
+ full_host + script_name + callback_path + check_if_mobile
34
40
  end
41
+
42
+ def check_if_mobile
43
+ "?" + {m: options.authorize_params[:m]}.to_query
44
+ end
45
+
46
+ def setup_phase
47
+ options.authorize_params[:m] = request.params["m"]
48
+ end
49
+
35
50
  end
36
51
  end
37
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-identitas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yunanhelmy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-27 00:00:00.000000000 Z
11
+ date: 2017-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2