stytch 10.18.0 → 10.20.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/b2b_discovery.rb +23 -22
- data/lib/stytch/b2b_magic_links.rb +3 -0
- data/lib/stytch/b2b_organizations.rb +292 -2
- data/lib/stytch/b2b_otp.rb +6 -3
- data/lib/stytch/b2b_passwords.rb +17 -8
- data/lib/stytch/b2b_sessions.rb +21 -16
- data/lib/stytch/b2b_sso.rb +3 -0
- data/lib/stytch/crypto_wallets.rb +2 -2
- data/lib/stytch/fraud.rb +1 -1
- data/lib/stytch/impersonation.rb +1 -1
- data/lib/stytch/magic_links.rb +19 -9
- data/lib/stytch/oauth.rb +2 -2
- data/lib/stytch/otps.rb +11 -11
- data/lib/stytch/passwords.rb +13 -13
- data/lib/stytch/sessions.rb +12 -10
- data/lib/stytch/totps.rb +6 -6
- data/lib/stytch/users.rb +76 -7
- data/lib/stytch/version.rb +1 -1
- data/lib/stytch/webauthn.rb +6 -6
- metadata +2 -2
data/lib/stytch/users.rb
CHANGED
@@ -45,7 +45,7 @@ module Stytch
|
|
45
45
|
# The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
|
46
46
|
# The type of this field is nilable +object+.
|
47
47
|
# external_id::
|
48
|
-
# An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
|
48
|
+
# An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
|
49
49
|
# The type of this field is nilable +String+.
|
50
50
|
#
|
51
51
|
# == Returns:
|
@@ -99,7 +99,7 @@ module Stytch
|
|
99
99
|
#
|
100
100
|
# == Parameters:
|
101
101
|
# user_id::
|
102
|
-
# The unique ID of a specific User. You may use an external_id here if one is set for the user.
|
102
|
+
# The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
|
103
103
|
# The type of this field is +String+.
|
104
104
|
#
|
105
105
|
# == Returns:
|
@@ -134,6 +134,9 @@ module Stytch
|
|
134
134
|
# biometric_registrations::
|
135
135
|
# An array that contains a list of all biometric registrations for a given User in the Stytch API.
|
136
136
|
# The type of this field is list of +BiometricRegistration+ (+object+).
|
137
|
+
# is_locked::
|
138
|
+
# (no documentation yet)
|
139
|
+
# The type of this field is +Boolean+.
|
137
140
|
# status_code::
|
138
141
|
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
139
142
|
# The type of this field is +Integer+.
|
@@ -155,6 +158,12 @@ module Stytch
|
|
155
158
|
# external_id::
|
156
159
|
# (no documentation yet)
|
157
160
|
# The type of this field is nilable +String+.
|
161
|
+
# lock_created_at::
|
162
|
+
# (no documentation yet)
|
163
|
+
# The type of this field is nilable +String+.
|
164
|
+
# lock_expires_at::
|
165
|
+
# (no documentation yet)
|
166
|
+
# The type of this field is nilable +String+.
|
158
167
|
def get(
|
159
168
|
user_id:
|
160
169
|
)
|
@@ -219,13 +228,13 @@ module Stytch
|
|
219
228
|
#
|
220
229
|
# == Parameters:
|
221
230
|
# user_id::
|
222
|
-
# The unique ID of a specific User. You may use an external_id here if one is set for the user.
|
231
|
+
# The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
|
223
232
|
# The type of this field is +String+.
|
224
233
|
# name::
|
225
234
|
# The name of the user. Each field in the name object is optional.
|
226
235
|
# The type of this field is nilable +Name+ (+object+).
|
227
236
|
# attributes::
|
228
|
-
# Provided attributes help with fraud detection.
|
237
|
+
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
229
238
|
# The type of this field is nilable +Attributes+ (+object+).
|
230
239
|
# trusted_metadata::
|
231
240
|
# The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
|
@@ -234,7 +243,7 @@ module Stytch
|
|
234
243
|
# The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details.
|
235
244
|
# The type of this field is nilable +object+.
|
236
245
|
# external_id::
|
237
|
-
# An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
|
246
|
+
# An identifier that can be used in API calls wherever a user_id is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters.
|
238
247
|
# The type of this field is nilable +String+.
|
239
248
|
#
|
240
249
|
# == Returns:
|
@@ -289,7 +298,7 @@ module Stytch
|
|
289
298
|
#
|
290
299
|
# == Parameters:
|
291
300
|
# user_id::
|
292
|
-
# The unique ID of a specific User. You may use an external_id here if one is set for the user.
|
301
|
+
# The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
|
293
302
|
# The type of this field is +String+.
|
294
303
|
# email_address::
|
295
304
|
# The email address to exchange to.
|
@@ -329,7 +338,7 @@ module Stytch
|
|
329
338
|
#
|
330
339
|
# == Parameters:
|
331
340
|
# user_id::
|
332
|
-
# The unique ID of a specific User. You may use an external_id here if one is set for the user.
|
341
|
+
# The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
|
333
342
|
# The type of this field is +String+.
|
334
343
|
#
|
335
344
|
# == Returns:
|
@@ -573,5 +582,65 @@ module Stytch
|
|
573
582
|
headers = {}
|
574
583
|
delete_request("/v1/users/oauth/#{oauth_user_registration_id}", headers)
|
575
584
|
end
|
585
|
+
|
586
|
+
# User Get Connected Apps retrieves a list of Connected Apps with which the User has successfully completed an
|
587
|
+
# authorization flow.
|
588
|
+
# If the User revokes a Connected App's access (e.g. via the Revoke Connected App endpoint) then the Connected App will
|
589
|
+
# no longer be returned in the response.
|
590
|
+
#
|
591
|
+
# == Parameters:
|
592
|
+
# user_id::
|
593
|
+
# The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
|
594
|
+
# The type of this field is +String+.
|
595
|
+
#
|
596
|
+
# == Returns:
|
597
|
+
# An object with the following fields:
|
598
|
+
# request_id::
|
599
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
600
|
+
# The type of this field is +String+.
|
601
|
+
# connected_apps::
|
602
|
+
# An array of Connected Apps with which the User has successfully completed an authorization flow.
|
603
|
+
# The type of this field is list of +UserConnectedApp+ (+object+).
|
604
|
+
# status_code::
|
605
|
+
# (no documentation yet)
|
606
|
+
# The type of this field is +Integer+.
|
607
|
+
def connected_apps(
|
608
|
+
user_id:
|
609
|
+
)
|
610
|
+
headers = {}
|
611
|
+
query_params = {}
|
612
|
+
request = request_with_query_params("/v1/users/#{user_id}/connected_apps", query_params)
|
613
|
+
get_request(request, headers)
|
614
|
+
end
|
615
|
+
|
616
|
+
# Revoke Connected App revokes a Connected App's access to a User and revokes all active tokens that have been created
|
617
|
+
# on the User's behalf. New tokens cannot be created until the User completes a new authorization flow with the
|
618
|
+
# Connected App.
|
619
|
+
#
|
620
|
+
# == Parameters:
|
621
|
+
# user_id::
|
622
|
+
# The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
|
623
|
+
# The type of this field is +String+.
|
624
|
+
# connected_app_id::
|
625
|
+
# The ID of the Connected App.
|
626
|
+
# The type of this field is +String+.
|
627
|
+
#
|
628
|
+
# == Returns:
|
629
|
+
# An object with the following fields:
|
630
|
+
# request_id::
|
631
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
632
|
+
# The type of this field is +String+.
|
633
|
+
# status_code::
|
634
|
+
# (no documentation yet)
|
635
|
+
# The type of this field is +Integer+.
|
636
|
+
def revoke(
|
637
|
+
user_id:,
|
638
|
+
connected_app_id:
|
639
|
+
)
|
640
|
+
headers = {}
|
641
|
+
request = {}
|
642
|
+
|
643
|
+
post_request("/v1/users/#{user_id}/connected_apps/#{connected_app_id}/revoke", request, headers)
|
644
|
+
end
|
576
645
|
end
|
577
646
|
end
|
data/lib/stytch/version.rb
CHANGED
data/lib/stytch/webauthn.rb
CHANGED
@@ -26,13 +26,13 @@ module Stytch
|
|
26
26
|
#
|
27
27
|
# == Parameters:
|
28
28
|
# user_id::
|
29
|
-
# The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an external_id here if one is set for the user.
|
29
|
+
# The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user.
|
30
30
|
# The type of this field is +String+.
|
31
31
|
# domain::
|
32
32
|
# The domain for Passkeys or WebAuthn. Defaults to `window.location.hostname`.
|
33
33
|
# The type of this field is +String+.
|
34
34
|
# user_agent::
|
35
|
-
# The user agent of the
|
35
|
+
# The user agent of the client.
|
36
36
|
# The type of this field is nilable +String+.
|
37
37
|
# authenticator_type::
|
38
38
|
# The requested authenticator type of the Passkey or WebAuthn device. The two valid values are platform and cross-platform. If no value passed, we assume both values are allowed.
|
@@ -96,7 +96,7 @@ module Stytch
|
|
96
96
|
#
|
97
97
|
# == Parameters:
|
98
98
|
# user_id::
|
99
|
-
# The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an external_id here if one is set for the user.
|
99
|
+
# The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user.
|
100
100
|
# The type of this field is +String+.
|
101
101
|
# public_key_credential::
|
102
102
|
# The response of the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential).
|
@@ -150,7 +150,7 @@ module Stytch
|
|
150
150
|
# session::
|
151
151
|
# If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
|
152
152
|
#
|
153
|
-
# See [
|
153
|
+
# See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
|
154
154
|
#
|
155
155
|
# The type of this field is nilable +Session+ (+object+).
|
156
156
|
def register(
|
@@ -187,7 +187,7 @@ module Stytch
|
|
187
187
|
# The domain for Passkeys or WebAuthn. Defaults to `window.location.hostname`.
|
188
188
|
# The type of this field is +String+.
|
189
189
|
# user_id::
|
190
|
-
# The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an external_id here if one is set for the user.
|
190
|
+
# The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user.
|
191
191
|
# The type of this field is nilable +String+.
|
192
192
|
# return_passkey_credential_options::
|
193
193
|
# If true, the `public_key_credential_creation_options` returned will be optimized for Passkeys with `userVerification` set to `"preferred"`.
|
@@ -280,7 +280,7 @@ module Stytch
|
|
280
280
|
# session::
|
281
281
|
# If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
|
282
282
|
#
|
283
|
-
# See [
|
283
|
+
# See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
|
284
284
|
#
|
285
285
|
# The type of this field is nilable +Session+ (+object+).
|
286
286
|
def authenticate(
|
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: 10.
|
4
|
+
version: 10.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|