stytch 10.18.0 → 10.19.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.
@@ -30,7 +30,7 @@ module Stytch
30
30
  # In the redirect URL, the `stytch_token_type` will be `magic_link`. See [here](https://stytch.com/docs/workspace-management/redirect-urls) for more detail.
31
31
  # The type of this field is +String+.
32
32
  # attributes::
33
- # Provided attributes help with fraud detection.
33
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
34
34
  # The type of this field is nilable +Attributes+ (+object+).
35
35
  # options::
36
36
  # Specify optional security settings.
@@ -90,7 +90,7 @@ module Stytch
90
90
  # session::
91
91
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
92
92
  #
93
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
93
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
94
94
  #
95
95
  # The type of this field is nilable +Session+ (+object+).
96
96
  def authenticate(
@@ -127,13 +127,13 @@ module Stytch
127
127
  #
128
128
  # == Parameters:
129
129
  # user_id::
130
- # The unique ID of a specific User. You may use an external_id here if one is set for the user.
130
+ # The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
131
131
  # The type of this field is +String+.
132
132
  # expiration_minutes::
133
133
  # Set the expiration for the Magic Link `token` in minutes. By default, it expires in 1 hour. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins).
134
134
  # The type of this field is nilable +Integer+.
135
135
  # attributes::
136
- # Provided attributes help with fraud detection.
136
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
137
137
  # The type of this field is nilable +Attributes+ (+object+).
138
138
  #
139
139
  # == Returns:
@@ -188,7 +188,7 @@ module Stytch
188
188
  # Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login.
189
189
  # The type of this field is nilable +String+.
190
190
  # attributes::
191
- # Provided attributes help with fraud detection.
191
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
192
192
  # The type of this field is nilable +Attributes+ (+object+).
193
193
  # login_magic_link_url::
194
194
  # The URL the end user clicks from the login Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and log in the User. If this value is not passed, the default login redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned.
@@ -206,7 +206,7 @@ module Stytch
206
206
  # A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
207
207
  # The type of this field is nilable +String+.
208
208
  # user_id::
209
- # The unique ID of a specific User. You may use an external_id here if one is set for the user.
209
+ # The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
210
210
  # The type of this field is nilable +String+.
211
211
  # session_token::
212
212
  # The `session_token` of the user to associate the email with.
@@ -303,7 +303,7 @@ module Stytch
303
303
  # Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up.
304
304
  # The type of this field is nilable +String+.
305
305
  # attributes::
306
- # Provided attributes help with fraud detection.
306
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
307
307
  # The type of this field is nilable +Attributes+ (+object+).
308
308
  # create_user_as_pending::
309
309
  # Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false.
@@ -385,7 +385,7 @@ module Stytch
385
385
  # Use a custom template for invite emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Invite.
386
386
  # The type of this field is nilable +String+.
387
387
  # attributes::
388
- # Provided attributes help with fraud detection.
388
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
389
389
  # The type of this field is nilable +Attributes+ (+object+).
390
390
  # name::
391
391
  # The name of the user. Each field in the name object is optional.
@@ -404,6 +404,12 @@ module Stytch
404
404
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
405
405
  #
406
406
  # The type of this field is nilable +InviteRequestLocale+ (string enum).
407
+ # trusted_metadata::
408
+ # 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.
409
+ # The type of this field is nilable +object+.
410
+ # untrusted_metadata::
411
+ # 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.
412
+ # The type of this field is nilable +object+.
407
413
  #
408
414
  # == Returns:
409
415
  # An object with the following fields:
@@ -426,7 +432,9 @@ module Stytch
426
432
  name: nil,
427
433
  invite_magic_link_url: nil,
428
434
  invite_expiration_minutes: nil,
429
- locale: nil
435
+ locale: nil,
436
+ trusted_metadata: nil,
437
+ untrusted_metadata: nil
430
438
  )
431
439
  headers = {}
432
440
  request = {
@@ -438,6 +446,8 @@ module Stytch
438
446
  request[:invite_magic_link_url] = invite_magic_link_url unless invite_magic_link_url.nil?
439
447
  request[:invite_expiration_minutes] = invite_expiration_minutes unless invite_expiration_minutes.nil?
440
448
  request[:locale] = locale unless locale.nil?
449
+ request[:trusted_metadata] = trusted_metadata unless trusted_metadata.nil?
450
+ request[:untrusted_metadata] = untrusted_metadata unless untrusted_metadata.nil?
441
451
 
442
452
  post_request('/v1/magic_links/email/invite', request, headers)
443
453
  end
data/lib/stytch/oauth.rb CHANGED
@@ -29,7 +29,7 @@ module Stytch
29
29
  # The OAuth provider's name.
30
30
  # The type of this field is +String+.
31
31
  # user_id::
32
- # The unique ID of a specific User. You may use an external_id here if one is set for the user.
32
+ # The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
33
33
  # The type of this field is nilable +String+.
34
34
  # session_token::
35
35
  # The `session_token` associated with a User's existing Session.
@@ -142,7 +142,7 @@ module Stytch
142
142
  # user_session::
143
143
  # A `Session` object. For backwards compatibility reasons, the session from an OAuth authenticate call is labeled as `user_session`, but is otherwise just a standard stytch `Session` object.
144
144
  #
145
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
145
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
146
146
  #
147
147
  # The type of this field is nilable +Session+ (+object+).
148
148
  def authenticate(
data/lib/stytch/otps.rb CHANGED
@@ -31,7 +31,7 @@ module Stytch
31
31
  # The code to authenticate.
32
32
  # The type of this field is +String+.
33
33
  # attributes::
34
- # Provided attributes help with fraud detection.
34
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
35
35
  # The type of this field is nilable +Attributes+ (+object+).
36
36
  # options::
37
37
  # Specify optional security settings.
@@ -88,7 +88,7 @@ module Stytch
88
88
  # session::
89
89
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
90
90
  #
91
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
91
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
92
92
  #
93
93
  # The type of this field is nilable +Session+ (+object+).
94
94
  def authenticate(
@@ -150,7 +150,7 @@ module Stytch
150
150
  # Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
151
151
  # The type of this field is nilable +Integer+.
152
152
  # attributes::
153
- # Provided attributes help with fraud detection.
153
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
154
154
  # The type of this field is nilable +Attributes+ (+object+).
155
155
  # locale::
156
156
  # Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
@@ -161,7 +161,7 @@ module Stytch
161
161
  #
162
162
  # The type of this field is nilable +SendRequestLocale+ (string enum).
163
163
  # user_id::
164
- # The unique ID of a specific User. You may use an external_id here if one is set for the user.
164
+ # The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
165
165
  # The type of this field is nilable +String+.
166
166
  # session_token::
167
167
  # The `session_token` associated with a User's existing Session.
@@ -228,7 +228,7 @@ module Stytch
228
228
  # Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
229
229
  # The type of this field is nilable +Integer+.
230
230
  # attributes::
231
- # Provided attributes help with fraud detection.
231
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
232
232
  # The type of this field is nilable +Attributes+ (+object+).
233
233
  # create_user_as_pending::
234
234
  # Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false.
@@ -313,7 +313,7 @@ module Stytch
313
313
  # Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
314
314
  # The type of this field is nilable +Integer+.
315
315
  # attributes::
316
- # Provided attributes help with fraud detection.
316
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
317
317
  # The type of this field is nilable +Attributes+ (+object+).
318
318
  # locale::
319
319
  # Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
@@ -324,7 +324,7 @@ module Stytch
324
324
  #
325
325
  # The type of this field is nilable +SendRequestLocale+ (string enum).
326
326
  # user_id::
327
- # The unique ID of a specific User. You may use an external_id here if one is set for the user.
327
+ # The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
328
328
  # The type of this field is nilable +String+.
329
329
  # session_token::
330
330
  # The `session_token` associated with a User's existing Session.
@@ -387,7 +387,7 @@ module Stytch
387
387
  # Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
388
388
  # The type of this field is nilable +Integer+.
389
389
  # attributes::
390
- # Provided attributes help with fraud detection.
390
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
391
391
  # The type of this field is nilable +Attributes+ (+object+).
392
392
  # create_user_as_pending::
393
393
  # Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false.
@@ -465,7 +465,7 @@ module Stytch
465
465
  # Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
466
466
  # The type of this field is nilable +Integer+.
467
467
  # attributes::
468
- # Provided attributes help with fraud detection.
468
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
469
469
  # The type of this field is nilable +Attributes+ (+object+).
470
470
  # locale::
471
471
  # Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
@@ -476,7 +476,7 @@ module Stytch
476
476
  #
477
477
  # The type of this field is nilable +SendRequestLocale+ (string enum).
478
478
  # user_id::
479
- # The unique ID of a specific User. You may use an external_id here if one is set for the user.
479
+ # The unique ID of a specific User. You may use an `external_id` here if one is set for the user.
480
480
  # The type of this field is nilable +String+.
481
481
  # session_token::
482
482
  # The `session_token` associated with a User's existing Session.
@@ -546,7 +546,7 @@ module Stytch
546
546
  # Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
547
547
  # The type of this field is nilable +Integer+.
548
548
  # attributes::
549
- # Provided attributes help with fraud detection.
549
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
550
550
  # The type of this field is nilable +Attributes+ (+object+).
551
551
  # create_user_as_pending::
552
552
  # Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false.
@@ -34,7 +34,7 @@ module Stytch
34
34
  # The email address of the end user.
35
35
  # The type of this field is +String+.
36
36
  # password::
37
- # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
37
+ # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characters, etc.
38
38
  # The type of this field is +String+.
39
39
  # session_duration_minutes::
40
40
  # Set the session lifetime to be this many minutes from now. This will start a new session if one doesn't already exist,
@@ -88,7 +88,7 @@ module Stytch
88
88
  # session::
89
89
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
90
90
  #
91
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
91
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
92
92
  #
93
93
  # The type of this field is nilable +Session+ (+object+).
94
94
  def create(
@@ -127,7 +127,7 @@ module Stytch
127
127
  # The email address of the end user.
128
128
  # The type of this field is +String+.
129
129
  # password::
130
- # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
130
+ # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characters, etc.
131
131
  # The type of this field is +String+.
132
132
  # session_token::
133
133
  # The `session_token` associated with a User's existing Session.
@@ -175,7 +175,7 @@ module Stytch
175
175
  # session::
176
176
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
177
177
  #
178
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
178
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
179
179
  #
180
180
  # The type of this field is nilable +Session+ (+object+).
181
181
  def authenticate(
@@ -214,7 +214,7 @@ module Stytch
214
214
  #
215
215
  # == Parameters:
216
216
  # password::
217
- # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
217
+ # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characters, etc.
218
218
  # The type of this field is +String+.
219
219
  # email::
220
220
  # The email address of the end user.
@@ -308,7 +308,7 @@ module Stytch
308
308
  # the user owns the phone number in question. Access to this field is restricted. To enable it, please send us a note at support@stytch.com.
309
309
  # The type of this field is nilable +Boolean+.
310
310
  # external_id::
311
- # If a new user is created, this will set 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. External IDs must be unique within an organization, but may be reused across different organizations in the same project. Note that if a user already exists, this field will be ignored.
311
+ # If a new user is created, this will set 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.
312
312
  # The type of this field is nilable +String+.
313
313
  #
314
314
  # == Returns:
@@ -398,7 +398,7 @@ module Stytch
398
398
  # A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
399
399
  # The type of this field is nilable +String+.
400
400
  # attributes::
401
- # Provided attributes help with fraud detection.
401
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
402
402
  # The type of this field is nilable +Attributes+ (+object+).
403
403
  # login_redirect_url::
404
404
  # The URL Stytch redirects to after the OAuth flow is completed for a user that already exists. This URL should be a route in your application which will run `oauth.authenticate` (see below) and finish the login.
@@ -472,7 +472,7 @@ module Stytch
472
472
  # See examples and read more about redirect URLs [here](https://stytch.com/docs/workspace-management/redirect-urls).
473
473
  # The type of this field is +String+.
474
474
  # password::
475
- # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
475
+ # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characters, etc.
476
476
  # The type of this field is +String+.
477
477
  # session_token::
478
478
  # The `session_token` associated with a User's existing Session.
@@ -500,7 +500,7 @@ module Stytch
500
500
  # Custom claims made with reserved claims ("iss", "sub", "aud", "exp", "nbf", "iat", "jti") will be ignored. Total custom claims size cannot exceed four kilobytes.
501
501
  # The type of this field is nilable +object+.
502
502
  # attributes::
503
- # Provided attributes help with fraud detection.
503
+ # Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
504
504
  # The type of this field is nilable +Attributes+ (+object+).
505
505
  # options::
506
506
  # Specify optional security settings.
@@ -529,7 +529,7 @@ module Stytch
529
529
  # session::
530
530
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
531
531
  #
532
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
532
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
533
533
  #
534
534
  # The type of this field is nilable +Session+ (+object+).
535
535
  def reset(
@@ -627,7 +627,7 @@ module Stytch
627
627
  # session::
628
628
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
629
629
  #
630
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
630
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
631
631
  #
632
632
  # The type of this field is nilable +Session+ (+object+).
633
633
  def reset(
@@ -667,7 +667,7 @@ module Stytch
667
667
  #
668
668
  # == Parameters:
669
669
  # password::
670
- # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characers, etc.
670
+ # The password for the user. Any UTF8 character is allowed, e.g. spaces, emojis, non-English characters, etc.
671
671
  # The type of this field is +String+.
672
672
  # session_token::
673
673
  # The `session_token` associated with a User's existing Session.
@@ -715,7 +715,7 @@ module Stytch
715
715
  # session::
716
716
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
717
717
  #
718
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
718
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
719
719
  #
720
720
  # The type of this field is nilable +Session+ (+object+).
721
721
  def reset(
@@ -37,7 +37,7 @@ module Stytch
37
37
  #
38
38
  # == Parameters:
39
39
  # user_id::
40
- # The `user_id` to get active Sessions for. You may use an external_id here if one is set for the user.
40
+ # The `user_id` to get active Sessions for. You may use an `external_id` here if one is set for the user.
41
41
  # The type of this field is +String+.
42
42
  #
43
43
  # == Returns:
@@ -46,7 +46,7 @@ module Stytch
46
46
  # 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.
47
47
  # The type of this field is +String+.
48
48
  # sessions::
49
- # An array of Session objects.
49
+ # An array of [Session objects](https://stytch.com/docs/api/session-object).
50
50
  # The type of this field is list of +Session+ (+object+).
51
51
  # status_code::
52
52
  # 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.
@@ -90,7 +90,7 @@ module Stytch
90
90
  # session::
91
91
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
92
92
  #
93
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
93
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
94
94
  #
95
95
  # The type of this field is +Session+ (+object+).
96
96
  # session_token::
@@ -202,7 +202,7 @@ module Stytch
202
202
  # session::
203
203
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
204
204
  #
205
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
205
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
206
206
  #
207
207
  # The type of this field is nilable +Session+ (+object+).
208
208
  def migrate(
@@ -269,7 +269,7 @@ module Stytch
269
269
  # session::
270
270
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
271
271
  #
272
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
272
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
273
273
  #
274
274
  # The type of this field is nilable +Session+ (+object+).
275
275
  def exchange_access_token(
@@ -289,13 +289,13 @@ module Stytch
289
289
 
290
290
  # Get the JSON Web Key Set (JWKS) for a project.
291
291
  #
292
- # JWKS are rotated every ~6 months. Upon rotation, new JWTs will be signed using the new key, and both keys will be returned by this endpoint for a period of 1 month.
292
+ # Within the JWKS, the JSON Web Keys are rotated every ~6 months. Upon rotation, new JWTs will be signed using the new key, and both keys will be returned by this endpoint for a period of 1 month.
293
293
  #
294
- # JWTs have a set lifetime of 5 minutes, so there will be a 5 minute period where some JWTs will be signed by the old JWKS, and some JWTs will be signed by the new JWKS. The correct JWKS to use for validation is determined by matching the `kid` value of the JWT and JWKS.
294
+ # JWTs have a set lifetime of 5 minutes, so there will be a 5 minute period where some JWTs will be signed by the old keys, and some JWTs will be signed by the new keys. The correct key to use for validation is determined by matching the `kid` value of the JWT and key.
295
295
  #
296
- # If you're using one of our [backend SDKs](https://stytch.com/docs/sdks), the JWKS rotation will be handled for you.
296
+ # If you're using one of our [backend SDKs](https://stytch.com/docs/b2b/sdks), the JSON Web Key (JWK) rotation will be handled for you.
297
297
  #
298
- # If you're using your own JWT validation library, many have built-in support for JWKS rotation, and you'll just need to supply this API endpoint. If not, your application should decide which JWKS to use for validation by inspecting the `kid` value.
298
+ # If you're using your own JWT validation library, many have built-in support for JWK rotation, and you'll just need to supply this API endpoint. If not, your application should decide which JWK to use for validation by inspecting the `kid` value.
299
299
  #
300
300
  # See our [How to use Stytch Session JWTs](https://stytch.com/docs/guides/sessions/using-jwts) guide for more information.
301
301
  #
data/lib/stytch/totps.rb CHANGED
@@ -20,7 +20,7 @@ module Stytch
20
20
  #
21
21
  # == Parameters:
22
22
  # user_id::
23
- # The `user_id` of an active user the TOTP registration should be tied to. You may use an external_id here if one is set for the user.
23
+ # The `user_id` of an active user the TOTP registration should be tied to. You may use an `external_id` here if one is set for the user.
24
24
  # The type of this field is +String+.
25
25
  # expiration_minutes::
26
26
  # The expiration for the TOTP instance. If the newly created TOTP is not authenticated within this time frame the TOTP will be unusable. Defaults to 1440 (1 day) with a minimum of 5 and a maximum of 1440.
@@ -69,7 +69,7 @@ module Stytch
69
69
  #
70
70
  # == Parameters:
71
71
  # user_id::
72
- # The `user_id` of an active user the TOTP registration should be tied to. You may use an external_id here if one is set for the user.
72
+ # The `user_id` of an active user the TOTP registration should be tied to. You may use an `external_id` here if one is set for the user.
73
73
  # The type of this field is +String+.
74
74
  # totp_code::
75
75
  # The TOTP code to authenticate. The TOTP code should consist of 6 digits.
@@ -123,7 +123,7 @@ module Stytch
123
123
  # session::
124
124
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
125
125
  #
126
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
126
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
127
127
  #
128
128
  # The type of this field is nilable +Session+ (+object+).
129
129
  def authenticate(
@@ -151,7 +151,7 @@ module Stytch
151
151
  #
152
152
  # == Parameters:
153
153
  # user_id::
154
- # The `user_id` of an active user the TOTP registration should be tied to. You may use an external_id here if one is set for the user.
154
+ # The `user_id` of an active user the TOTP registration should be tied to. You may use an `external_id` here if one is set for the user.
155
155
  # The type of this field is +String+.
156
156
  #
157
157
  # == Returns:
@@ -183,7 +183,7 @@ module Stytch
183
183
  #
184
184
  # == Parameters:
185
185
  # user_id::
186
- # The `user_id` of an active user the TOTP registration should be tied to. You may use an external_id here if one is set for the user.
186
+ # The `user_id` of an active user the TOTP registration should be tied to. You may use an `external_id` here if one is set for the user.
187
187
  # The type of this field is +String+.
188
188
  # recovery_code::
189
189
  # The recovery code to authenticate.
@@ -237,7 +237,7 @@ module Stytch
237
237
  # session::
238
238
  # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
239
239
  #
240
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
240
+ # See [Session object](https://stytch.com/docs/api/session-object) for complete response fields.
241
241
  #
242
242
  # The type of this field is nilable +Session+ (+object+).
243
243
  def recover(
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. External IDs must be unique within an organization, but may be reused across different organizations in the same project.
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. External IDs must be unique within an organization, but may be reused across different organizations in the same project.
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '10.18.0'
4
+ VERSION = '10.19.0'
5
5
  end