stytch 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stytch/endpoints/magic.rb +11 -9
- data/lib/stytch/endpoints/user.rb +5 -3
- data/lib/stytch/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: be9237c8c5508d86e48b380ecbc379bdc5eacde5409b6c656f9a110b159e7a26
|
4
|
+
data.tar.gz: 6c3681406de7d46108658c5a39711d7e3a512839b9bdccb729c97e88dda120ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f210e1218345e389d363cd7d92b7c8fac4c04a07e4058aa9d3d0196461e0b1ecc7e0d5694b6c52bf1a2e59b57981e191e8978f1617cfd8482434514a2cd0546
|
7
|
+
data.tar.gz: 43ed7e6c709c94ea8d1f7aecf0b04b7cfdac245f977637618bea496e7b173435c19dae6887a11215aa5facec598d3227669cf26be87506b4d865118fdfa54d3c
|
@@ -16,10 +16,11 @@ module Stytch
|
|
16
16
|
user_id: user_id,
|
17
17
|
magic_link_url: magic_link_url,
|
18
18
|
expiration_minutes: expiration_minutes,
|
19
|
-
template_id: template_id,
|
20
|
-
attributes: attributes
|
21
19
|
}
|
22
20
|
|
21
|
+
request[:template_id] = template_id if template_id != nil
|
22
|
+
request[:attributes] = attributes if attributes != {}
|
23
|
+
|
23
24
|
post("#{PATH}/send", request)
|
24
25
|
end
|
25
26
|
|
@@ -34,22 +35,23 @@ module Stytch
|
|
34
35
|
email: email,
|
35
36
|
magic_link_url: magic_link_url,
|
36
37
|
expiration_minutes: expiration_minutes,
|
37
|
-
template_id: template_id,
|
38
|
-
attributes: attributes
|
39
38
|
}
|
40
39
|
|
40
|
+
request[:template_id] = template_id if template_id != nil
|
41
|
+
request[:attributes] = attributes if attributes != {}
|
42
|
+
|
41
43
|
post("#{PATH}/send_by_email", request)
|
42
44
|
end
|
43
45
|
|
44
46
|
def authenticate_magic(
|
45
47
|
token:,
|
46
48
|
attributes: {},
|
47
|
-
options:{}
|
49
|
+
options: {}
|
48
50
|
)
|
49
|
-
request = {
|
50
|
-
|
51
|
-
|
52
|
-
}
|
51
|
+
request = {}
|
52
|
+
|
53
|
+
request[:attributes] = attributes if attributes != {}
|
54
|
+
request[:options] = options if options != {}
|
53
55
|
|
54
56
|
post("#{PATH}/#{token}/authenticate", request)
|
55
57
|
end
|
@@ -14,10 +14,11 @@ module Stytch
|
|
14
14
|
)
|
15
15
|
request = {
|
16
16
|
email: email,
|
17
|
-
name: name,
|
18
|
-
attributes: attributes,
|
19
17
|
}
|
20
18
|
|
19
|
+
request[:name] = name if name != {}
|
20
|
+
request[:attributes] = attributes if attributes != {}
|
21
|
+
|
21
22
|
post(PATH, request)
|
22
23
|
end
|
23
24
|
|
@@ -30,9 +31,10 @@ module Stytch
|
|
30
31
|
request = {
|
31
32
|
name: name,
|
32
33
|
emails: format_emails(emails),
|
33
|
-
attributes: attributes,
|
34
34
|
}
|
35
35
|
|
36
|
+
request[:attributes] = attributes if attributes != {}
|
37
|
+
|
36
38
|
put("#{PATH}/#{user_id}", request)
|
37
39
|
end
|
38
40
|
|
data/lib/stytch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stytch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alex-stytch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|