omniauth-square-oauth2 0.1.0 → 0.2.1
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 +4 -4
- data/README.md +1 -1
- data/lib/omniauth/strategies/square.rb +6 -3
- data/lib/omniauth-square/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dbbd4880dcd058c91dfccee51fcad1f28dbc6a2213aba3fa190752870e2f3e6
|
4
|
+
data.tar.gz: 1e519f5ed04e2f5a0eaf8e2ba0513b419d3c35c0741bda1c0dacf516f788d20d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c149c89352d5f78e0ba70cf6dbdd8f2633c98eea3d7cfb94d2f00c6d2d0d010ec091862d9568f99234f3bd33dadbdc0406eec6d68254f72e7b3c8f64fc04e22
|
7
|
+
data.tar.gz: 0dcfcce43f17b2c4ee336695e8dea626d8d93782b7b67b2277963477a4d0d34577b7c93a2263c018d1190b689c5b5b5cbcbbe329143a5c0c38ceb5e0d8fb5fb2
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Once these are in, you need to add the following to your `config/initializers/de
|
|
20
20
|
|
21
21
|
Sandbox Example:
|
22
22
|
|
23
|
-
config.omniauth :square, "your_app_id", "your_app_oauth_secret", {:scope => "ITEMS_READ,ITEMS_WRITE,MERCHANT_PROFILE_READ", :client_options => {:
|
23
|
+
config.omniauth :square, "your_app_id", "your_app_oauth_secret", {:scope => "ITEMS_READ,ITEMS_WRITE,MERCHANT_PROFILE_READ", :client_options => {:site => 'https://connect.squareupsandbox.com'}}
|
24
24
|
|
25
25
|
You will obviously have to put in your key and secret, which you get when you register your app with Square (they call them Application Key and Secret Key).
|
26
26
|
|
@@ -39,9 +39,12 @@ module OmniAuth
|
|
39
39
|
|
40
40
|
def raw_info
|
41
41
|
@raw_info ||= access_token.get('/v2/merchants').parsed
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
|
43
|
+
# Get merchant email
|
44
|
+
log :info, "Getting merchant email"
|
45
|
+
resp = access_token.post("/v2/team-members/search", {query: {filter: {is_owner: true}}}).parsed
|
46
|
+
log :info, "Got merchant email: #{resp[:team_members][0].email_address}"
|
47
|
+
@raw_info.merge!({email: resp[:team_members][0].email_address})
|
45
48
|
end
|
46
49
|
|
47
50
|
def prune!(hash)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-square-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Robinson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|