omniauth-linear 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/linear.rb +8 -4
- data/lib/omniauth-linear/version.rb +1 -1
- data/omniauth-linear.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fecc8a9475ce01f4d3fed3929fd6f3016740b6afcebbc628672720e2eccc9da5
|
4
|
+
data.tar.gz: d06067cec9650c874e2f8b6daa205e50e66adaac9c8e77ab014eed4ecbdebc5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e37095ac59369c4e3eacc9df3fba08b52872d526ded83e6958564997c16f3f22adffb30ef2eee296107673d2cac037e9487fdfb5fcfd4eb0a962bbad4704900
|
7
|
+
data.tar.gz: c25995cab54fe249a6d7f91c75dd7354c29c3da035cdac92a10813645fca5d92f71da9c4236536f5c87ab536d317047502411adbb14a8cc1153c03cde5eb6e30
|
@@ -30,10 +30,10 @@ module OmniAuth
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
uid { me
|
33
|
+
uid { "#{me['organization']['id']}-#{me['viewer']['id']}" }
|
34
34
|
|
35
35
|
extra do
|
36
|
-
{ raw_info: raw_info, me: me
|
36
|
+
{ raw_info: raw_info, me: me['viewer'], organization: me['organization'] }
|
37
37
|
end
|
38
38
|
|
39
39
|
def raw_info
|
@@ -53,6 +53,10 @@ module OmniAuth
|
|
53
53
|
|
54
54
|
gql = client.parse <<~GRAPHQL
|
55
55
|
query {
|
56
|
+
organization {
|
57
|
+
id
|
58
|
+
name
|
59
|
+
}
|
56
60
|
viewer {
|
57
61
|
id
|
58
62
|
name
|
@@ -61,7 +65,7 @@ module OmniAuth
|
|
61
65
|
}
|
62
66
|
GRAPHQL
|
63
67
|
response = client.query(gql, context: {token: access_token.token})
|
64
|
-
response.data
|
68
|
+
response.data.to_h
|
65
69
|
end
|
66
70
|
end
|
67
71
|
|
@@ -72,4 +76,4 @@ module OmniAuth
|
|
72
76
|
end
|
73
77
|
end
|
74
78
|
|
75
|
-
OmniAuth.config.add_camelization 'linear', 'Linear'
|
79
|
+
OmniAuth.config.add_camelization 'linear', 'Linear'
|
data/omniauth-linear.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
|
19
19
|
gem.add_dependency 'omniauth', '~> 1.5'
|
20
20
|
gem.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
|
21
|
-
gem.add_dependency '
|
21
|
+
gem.add_dependency 'graphql-client'
|
22
22
|
gem.add_development_dependency 'rspec', '~> 3.5'
|
23
23
|
gem.add_development_dependency 'rack-test'
|
24
24
|
gem.add_development_dependency 'simplecov'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-linear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quentin Rousseau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '2.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: graphql-client
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|