stytch 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stytch/magic_links.rb +13 -13
- data/lib/stytch/totps.rb +4 -4
- data/lib/stytch/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b1b869e6182a03431f7159bcfde6544be7d21819449f95cb53a69cc6534a433
|
4
|
+
data.tar.gz: b54b8ca4edc62df234546d6f681562b053a1b31677aa090b2ffa7577bbff318f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb5bda40dc3bf05a2e09b0637723febf156c443587d82286fe9112739aa747f2572d9884aeed8b95a05f79d6ef16cdd9d84da50fc5bd6d7228a4a05d9e288cd9
|
7
|
+
data.tar.gz: 0ab2ec0d82e2d5cd0b1056d02209e0b4c248d2e63ce2b9820cee56fd100381b80eae0ec3e962e92f0c4b8f86725707faa750c9b3f7ce6dd87847da4cb601f7b1
|
data/lib/stytch/magic_links.rb
CHANGED
@@ -28,7 +28,7 @@ module Stytch
|
|
28
28
|
request[:expiration_minutes] = expiration_minutes unless expiration_minutes.nil?
|
29
29
|
request[:attributes] = attributes if attributes != {}
|
30
30
|
|
31
|
-
post_request(PATH
|
31
|
+
post_request(PATH, request)
|
32
32
|
end
|
33
33
|
|
34
34
|
def authenticate(
|
@@ -61,18 +61,18 @@ module Stytch
|
|
61
61
|
|
62
62
|
def send(
|
63
63
|
email:,
|
64
|
-
login_magic_link_url
|
65
|
-
signup_magic_link_url
|
64
|
+
login_magic_link_url: nil,
|
65
|
+
signup_magic_link_url: nil,
|
66
66
|
login_expiration_minutes: nil,
|
67
67
|
signup_expiration_minutes: nil,
|
68
68
|
attributes: {}
|
69
69
|
)
|
70
70
|
request = {
|
71
|
-
email: email
|
72
|
-
login_magic_link_url: login_magic_link_url,
|
73
|
-
signup_magic_link_url: signup_magic_link_url
|
71
|
+
email: email
|
74
72
|
}
|
75
73
|
|
74
|
+
request[:login_magic_link_url] = login_magic_link_url unless login_magic_link_url.nil?
|
75
|
+
request[:signup_magic_link_url] = signup_magic_link_url unless signup_magic_link_url.nil?
|
76
76
|
request[:login_expiration_minutes] = login_expiration_minutes unless login_expiration_minutes.nil?
|
77
77
|
request[:signup_expiration_minutes] = signup_expiration_minutes unless signup_expiration_minutes.nil?
|
78
78
|
request[:attributes] = attributes if attributes != {}
|
@@ -82,8 +82,8 @@ module Stytch
|
|
82
82
|
|
83
83
|
def login_or_create(
|
84
84
|
email:,
|
85
|
-
login_magic_link_url
|
86
|
-
signup_magic_link_url
|
85
|
+
login_magic_link_url: nil,
|
86
|
+
signup_magic_link_url: nil,
|
87
87
|
login_expiration_minutes: nil,
|
88
88
|
signup_expiration_minutes: nil,
|
89
89
|
attributes: {},
|
@@ -91,11 +91,11 @@ module Stytch
|
|
91
91
|
)
|
92
92
|
request = {
|
93
93
|
email: email,
|
94
|
-
login_magic_link_url: login_magic_link_url,
|
95
|
-
signup_magic_link_url: signup_magic_link_url,
|
96
94
|
create_user_as_pending: create_user_as_pending
|
97
95
|
}
|
98
96
|
|
97
|
+
request[:login_magic_link_url] = login_magic_link_url unless login_magic_link_url.nil?
|
98
|
+
request[:signup_magic_link_url] = signup_magic_link_url unless signup_magic_link_url.nil?
|
99
99
|
request[:login_expiration_minutes] = login_expiration_minutes unless login_expiration_minutes.nil?
|
100
100
|
request[:signup_expiration_minutes] = signup_expiration_minutes unless signup_expiration_minutes.nil?
|
101
101
|
request[:attributes] = attributes if attributes != {}
|
@@ -105,16 +105,16 @@ module Stytch
|
|
105
105
|
|
106
106
|
def invite(
|
107
107
|
email:,
|
108
|
-
invite_magic_link_url
|
108
|
+
invite_magic_link_url: nil,
|
109
109
|
invite_expiration_minutes: nil,
|
110
110
|
attributes: {},
|
111
111
|
name: {}
|
112
112
|
)
|
113
113
|
request = {
|
114
|
-
email: email
|
115
|
-
invite_magic_link_url: invite_magic_link_url
|
114
|
+
email: email
|
116
115
|
}
|
117
116
|
|
117
|
+
request[:invite_magic_link_url] = invite_magic_link_url unless invite_magic_link_url.nil?
|
118
118
|
request[:invite_expiration_minutes] = invite_expiration_minutes unless invite_expiration_minutes.nil?
|
119
119
|
request[:attributes] = attributes if attributes != {}
|
120
120
|
request[:name] = name if name != {}
|
data/lib/stytch/totps.rb
CHANGED
@@ -17,12 +17,12 @@ module Stytch
|
|
17
17
|
expiration_minutes: nil
|
18
18
|
)
|
19
19
|
request = {
|
20
|
-
user_id: user_id
|
20
|
+
user_id: user_id
|
21
21
|
}
|
22
22
|
|
23
23
|
request[:expiration_minutes] = expiration_minutes unless expiration_minutes.nil?
|
24
24
|
|
25
|
-
post_request(
|
25
|
+
post_request(PATH, request)
|
26
26
|
end
|
27
27
|
|
28
28
|
def authenticate(
|
@@ -46,7 +46,7 @@ module Stytch
|
|
46
46
|
user_id:
|
47
47
|
)
|
48
48
|
request = {
|
49
|
-
user_id: user_id
|
49
|
+
user_id: user_id
|
50
50
|
}
|
51
51
|
|
52
52
|
post_request("#{PATH}/recovery_codes", request)
|
@@ -58,7 +58,7 @@ module Stytch
|
|
58
58
|
)
|
59
59
|
request = {
|
60
60
|
user_id: user_id,
|
61
|
-
recovery_code: recovery_code
|
61
|
+
recovery_code: recovery_code
|
62
62
|
}
|
63
63
|
|
64
64
|
post_request("#{PATH}/recover", request)
|
data/lib/stytch/version.rb
CHANGED
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stytch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-01-13 00:00:00.000000000 Z
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '2.0'
|
53
|
-
description:
|
53
|
+
description:
|
54
54
|
email:
|
55
55
|
- support@stytch.com
|
56
56
|
executables: []
|
@@ -88,7 +88,7 @@ licenses:
|
|
88
88
|
metadata:
|
89
89
|
homepage_uri: https://stytch.com
|
90
90
|
source_code_uri: https://github.com/stytchauth/stytch-ruby
|
91
|
-
post_install_message:
|
91
|
+
post_install_message:
|
92
92
|
rdoc_options: []
|
93
93
|
require_paths:
|
94
94
|
- lib
|
@@ -103,8 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
107
|
-
signing_key:
|
106
|
+
rubygems_version: 3.1.4
|
107
|
+
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Stytch Ruby Gem
|
110
110
|
test_files: []
|