stytch 0.1.15 → 0.1.20
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 +2 -2
- data/lib/stytch/endpoints/magic.rb +10 -28
- data/lib/stytch/endpoints/user.rb +2 -2
- data/lib/stytch/version.rb +1 -1
- 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: f433032f5886a7845a9ea6567dad3b080c604cf2f9f68dddf13e6370600f11fa
|
|
4
|
+
data.tar.gz: 72a52e55e18c8c196b2df876bf9b469d8076695bf7059271e12f4b93a43d72e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3255290e7d8d28f36401441251c248901c0873c8fd61d2a32c10004c9cfed7a74a62d6c07e7afaa004e21e06c903c9bff1268521b5bcd4019e9f1e816b2cda1d
|
|
7
|
+
data.tar.gz: 40e5b0f177e54ac5c27c33093b9c0f54fa3900c39587c802f4dfb26fc8b3f661e71dbb08482b0147f7af3bc0a3ad7edaec53a10c18efbdbd97269c83e14f3e0e
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Stytch
|
|
2
2
|
|
|
3
|
-
Welcome to the
|
|
3
|
+
Welcome to the official Stytch ruby gem! This gem provides easy access to Stytch's API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -41,4 +41,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
41
41
|
|
|
42
42
|
## Code of Conduct
|
|
43
43
|
|
|
44
|
-
Everyone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
44
|
+
Everyone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/stytchauth/stytch-ruby/blob/main/CODE_OF_CONDUCT.md).
|
|
@@ -7,16 +7,16 @@ module Stytch
|
|
|
7
7
|
method_id:,
|
|
8
8
|
user_id:,
|
|
9
9
|
magic_link_url:,
|
|
10
|
-
expiration_minutes
|
|
10
|
+
expiration_minutes: nil,
|
|
11
11
|
attributes: {}
|
|
12
12
|
)
|
|
13
13
|
request = {
|
|
14
14
|
method_id: method_id,
|
|
15
15
|
user_id: user_id,
|
|
16
16
|
magic_link_url: magic_link_url,
|
|
17
|
-
expiration_minutes: expiration_minutes,
|
|
18
17
|
}
|
|
19
18
|
|
|
19
|
+
request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
|
|
20
20
|
request[:attributes] = attributes if attributes != {}
|
|
21
21
|
|
|
22
22
|
post("#{PATH}/send", request)
|
|
@@ -25,15 +25,15 @@ module Stytch
|
|
|
25
25
|
def send_magic_by_email(
|
|
26
26
|
email:,
|
|
27
27
|
magic_link_url:,
|
|
28
|
-
expiration_minutes
|
|
28
|
+
expiration_minutes: nil,
|
|
29
29
|
attributes: {}
|
|
30
30
|
)
|
|
31
31
|
request = {
|
|
32
32
|
email: email,
|
|
33
33
|
magic_link_url: magic_link_url,
|
|
34
|
-
expiration_minutes: expiration_minutes,
|
|
35
34
|
}
|
|
36
35
|
|
|
36
|
+
request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
|
|
37
37
|
request[:attributes] = attributes if attributes != {}
|
|
38
38
|
|
|
39
39
|
post("#{PATH}/send_by_email", request)
|
|
@@ -45,13 +45,15 @@ module Stytch
|
|
|
45
45
|
signup_magic_link_url:,
|
|
46
46
|
login_expiration_minutes: nil,
|
|
47
47
|
signup_expiration_minutes: nil,
|
|
48
|
-
attributes: {}
|
|
48
|
+
attributes: {},
|
|
49
|
+
create_user_as_pending: false
|
|
49
50
|
)
|
|
50
51
|
|
|
51
52
|
request = {
|
|
52
53
|
email: email,
|
|
53
54
|
login_magic_link_url: login_magic_link_url,
|
|
54
55
|
signup_magic_link_url: signup_magic_link_url,
|
|
56
|
+
create_user_as_pending: create_user_as_pending,
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
request[:login_expiration_minutes] = login_expiration_minutes if login_expiration_minutes != nil
|
|
@@ -61,33 +63,12 @@ module Stytch
|
|
|
61
63
|
post("#{PATH}/login_or_create", request)
|
|
62
64
|
end
|
|
63
65
|
|
|
64
|
-
def login_or_invite_by_email(
|
|
65
|
-
email:,
|
|
66
|
-
login_magic_link_url:,
|
|
67
|
-
invite_magic_link_url:,
|
|
68
|
-
login_expiration_minutes: nil,
|
|
69
|
-
invite_expiration_minutes: nil,
|
|
70
|
-
attributes: {}
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
request = {
|
|
74
|
-
email: email,
|
|
75
|
-
login_magic_link_url: login_magic_link_url,
|
|
76
|
-
invite_magic_link_url: invite_magic_link_url,
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
request[:login_expiration_minutes] = login_expiration_minutes if login_expiration_minutes != nil
|
|
80
|
-
request[:invite_expiration_minutes] = invite_expiration_minutes if invite_expiration_minutes != nil
|
|
81
|
-
request[:attributes] = attributes if attributes != {}
|
|
82
|
-
|
|
83
|
-
post("#{PATH}/login_or_invite", request)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
66
|
def invite_by_email(
|
|
87
67
|
email:,
|
|
88
68
|
magic_link_url:,
|
|
89
69
|
expiration_minutes: nil,
|
|
90
|
-
attributes: {}
|
|
70
|
+
attributes: {},
|
|
71
|
+
name: {}
|
|
91
72
|
)
|
|
92
73
|
|
|
93
74
|
request = {
|
|
@@ -97,6 +78,7 @@ module Stytch
|
|
|
97
78
|
|
|
98
79
|
request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
|
|
99
80
|
request[:attributes] = attributes if attributes != {}
|
|
81
|
+
request[:name] = name if name != {}
|
|
100
82
|
|
|
101
83
|
post("#{PATH}/invite_by_email", request)
|
|
102
84
|
end
|
|
@@ -7,7 +7,7 @@ module Stytch
|
|
|
7
7
|
get("#{PATH}/#{user_id}")
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def
|
|
10
|
+
def get_pending_users(
|
|
11
11
|
limit: nil,
|
|
12
12
|
starting_after_id: nil
|
|
13
13
|
)
|
|
@@ -16,7 +16,7 @@ module Stytch
|
|
|
16
16
|
starting_after_id: starting_after_id,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
request = request_with_query_params("#{PATH}/
|
|
19
|
+
request = request_with_query_params("#{PATH}/pending", query_params)
|
|
20
20
|
|
|
21
21
|
get(request)
|
|
22
22
|
end
|
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.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- alex-stytch
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-04-22 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
|
- alex@stytch.com
|
|
56
56
|
executables: []
|
|
@@ -80,7 +80,7 @@ licenses:
|
|
|
80
80
|
metadata:
|
|
81
81
|
homepage_uri: https://stytch.com
|
|
82
82
|
source_code_uri: https://github.com/stytchauth/stytch-ruby
|
|
83
|
-
post_install_message:
|
|
83
|
+
post_install_message:
|
|
84
84
|
rdoc_options: []
|
|
85
85
|
require_paths:
|
|
86
86
|
- lib
|
|
@@ -95,8 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
requirements: []
|
|
98
|
-
rubygems_version: 3.
|
|
99
|
-
signing_key:
|
|
98
|
+
rubygems_version: 3.0.3
|
|
99
|
+
signing_key:
|
|
100
100
|
specification_version: 4
|
|
101
101
|
summary: Stytch Ruby Gem
|
|
102
102
|
test_files: []
|