stytch 2.9.0 → 2.10.0
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/lib/stytch/client.rb +1 -1
- data/lib/stytch/totps.rb +6 -1
- data/lib/stytch/version.rb +1 -1
- data/lib/stytch.rb +13 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2b973d686af6ce37a2f1d51825d075f0b361ad75eb06ee0d74df0ba343543bc
|
4
|
+
data.tar.gz: 4649dc2a86ddcb0013bfe8f1cee480fa8f0533fa52eabe4531fad4bc8acf0432
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e34d2f40645f2393c8573ce667c36fdff565c4918133b4bedc800b70c5e406822b33f85a5a95981bda8ceeaf4196ae3816ce863c20ac04b2f847b00be6b10c5
|
7
|
+
data.tar.gz: 97ad61637feec32db2b4e20927385c248b566c2c32ccc47e32be27a33d93363e04449e314357b30ed42fdaf645beab9e7464377d7b7b45be9df36ff37b03272c
|
data/lib/stytch/client.rb
CHANGED
data/lib/stytch/totps.rb
CHANGED
@@ -54,13 +54,18 @@ module Stytch
|
|
54
54
|
|
55
55
|
def recover(
|
56
56
|
user_id:,
|
57
|
-
recovery_code
|
57
|
+
recovery_code:,
|
58
|
+
session_token: nil,
|
59
|
+
session_duration_minutes: nil
|
58
60
|
)
|
59
61
|
request = {
|
60
62
|
user_id: user_id,
|
61
63
|
recovery_code: recovery_code
|
62
64
|
}
|
63
65
|
|
66
|
+
request[:session_token] = session_token unless session_token.nil?
|
67
|
+
request[:session_duration_minutes] = session_duration_minutes unless session_duration_minutes.nil?
|
68
|
+
|
64
69
|
post_request("#{PATH}/recover", request)
|
65
70
|
end
|
66
71
|
end
|
data/lib/stytch/version.rb
CHANGED
data/lib/stytch.rb
CHANGED
@@ -8,3 +8,16 @@ require_relative 'stytch/middleware'
|
|
8
8
|
require_relative 'stytch/version'
|
9
9
|
|
10
10
|
module Stytch end
|
11
|
+
|
12
|
+
client = Stytch::Client.new(
|
13
|
+
env: :test,
|
14
|
+
project_id: "project-test-2a934f44-a014-425d-aa1d-76f2d0344db7",
|
15
|
+
secret: "secret-test-z5kbR31dkcTnocolLJT77gkyX9KJQeU9umg="
|
16
|
+
)
|
17
|
+
|
18
|
+
resp = client.totps.authenticate(
|
19
|
+
user_id: "user-test-fa9e1ba8-6786-4a7c-923f-a76a2b82e6a5",
|
20
|
+
totp_code: "021363",
|
21
|
+
session_token: "HLr0NGPZkyn7xA9Vc9XFjOIDjUafuTumOT6au3-PqM83",
|
22
|
+
)
|
23
|
+
puts resp
|
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: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -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.0.3
|
107
|
+
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Stytch Ruby Gem
|
110
110
|
test_files: []
|