stytch 6.0.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -172,7 +172,7 @@ module Stytch
172
172
  # Adding a new email to an existing Stytch User requires the user to be present and validate the email via magic link. This requirement is in place to prevent account takeover attacks.
173
173
  #
174
174
  # ### Next steps
175
- # The user is emailed a magic link which redirects them to the provided [redirect URL](https://stytch.com/docs/magic-links#email-magic-links_redirect-routing). Collect the `token` from the URL query parameters, and call [Authenticate magic link](https://stytch.com/docs/api/authenticate-magic-link) to complete authentication.
175
+ # The user is emailed a magic link which redirects them to the provided [redirect URL](https://stytch.com/docs/guides/magic-links/email-magic-links/redirect-routing). Collect the `token` from the URL query parameters, and call [Authenticate magic link](https://stytch.com/docs/api/authenticate-magic-link) to complete authentication.
176
176
  #
177
177
  # == Parameters:
178
178
  # email::
@@ -215,7 +215,7 @@ module Stytch
215
215
  #
216
216
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
217
217
  #
218
- # The type of this field is nilable +SendRequestLocale+ (+object+).
218
+ # The type of this field is nilable +SendRequestLocale+ (string enum).
219
219
  # signup_template_id::
220
220
  # 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.
221
221
  # The type of this field is nilable +String+.
@@ -315,7 +315,7 @@ module Stytch
315
315
  #
316
316
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
317
317
  #
318
- # The type of this field is nilable +LoginOrCreateRequestLocale+ (+object+).
318
+ # The type of this field is nilable +LoginOrCreateRequestLocale+ (string enum).
319
319
  #
320
320
  # == Returns:
321
321
  # An object with the following fields:
@@ -395,7 +395,7 @@ module Stytch
395
395
  #
396
396
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
397
397
  #
398
- # The type of this field is nilable +InviteRequestLocale+ (+object+).
398
+ # The type of this field is nilable +InviteRequestLocale+ (string enum).
399
399
  #
400
400
  # == Returns:
401
401
  # An object with the following fields:
data/lib/stytch/otps.rb CHANGED
@@ -141,7 +141,7 @@ module Stytch
141
141
  # The phone number to use for one-time passcodes. The phone number should be in E.164 format. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail.
142
142
  # The type of this field is +String+.
143
143
  # expiration_minutes::
144
- # 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).
144
+ # 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.
145
145
  # The type of this field is nilable +Integer+.
146
146
  # attributes::
147
147
  # Provided attributes help with fraud detection.
@@ -153,7 +153,7 @@ module Stytch
153
153
  #
154
154
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
155
155
  #
156
- # The type of this field is nilable +SendRequestLocale+ (+object+).
156
+ # The type of this field is nilable +SendRequestLocale+ (string enum).
157
157
  # user_id::
158
158
  # The unique ID of a specific User.
159
159
  # The type of this field is nilable +String+.
@@ -211,7 +211,7 @@ module Stytch
211
211
  # The phone number to use for one-time passcodes. The phone number should be in E.164 format. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail.
212
212
  # The type of this field is +String+.
213
213
  # expiration_minutes::
214
- # 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).
214
+ # 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.
215
215
  # The type of this field is nilable +Integer+.
216
216
  # attributes::
217
217
  # Provided attributes help with fraud detection.
@@ -230,7 +230,7 @@ module Stytch
230
230
  #
231
231
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
232
232
  #
233
- # The type of this field is nilable +LoginOrCreateRequestLocale+ (+object+).
233
+ # The type of this field is nilable +LoginOrCreateRequestLocale+ (string enum).
234
234
  #
235
235
  # == Returns:
236
236
  # An object with the following fields:
@@ -294,7 +294,7 @@ module Stytch
294
294
  # The phone number to use for one-time passcodes. The phone number should be in E.164 format. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail.
295
295
  # The type of this field is +String+.
296
296
  # expiration_minutes::
297
- # 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).
297
+ # 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.
298
298
  # The type of this field is nilable +Integer+.
299
299
  # attributes::
300
300
  # Provided attributes help with fraud detection.
@@ -306,7 +306,7 @@ module Stytch
306
306
  #
307
307
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
308
308
  #
309
- # The type of this field is nilable +SendRequestLocale+ (+object+).
309
+ # The type of this field is nilable +SendRequestLocale+ (string enum).
310
310
  # user_id::
311
311
  # The unique ID of a specific User.
312
312
  # The type of this field is nilable +String+.
@@ -364,7 +364,7 @@ module Stytch
364
364
  # The phone number to use for one-time passcodes. The phone number should be in E.164 format. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail.
365
365
  # The type of this field is +String+.
366
366
  # expiration_minutes::
367
- # 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).
367
+ # 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.
368
368
  # The type of this field is nilable +Integer+.
369
369
  # attributes::
370
370
  # Provided attributes help with fraud detection.
@@ -383,7 +383,7 @@ module Stytch
383
383
  #
384
384
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
385
385
  #
386
- # The type of this field is nilable +LoginOrCreateRequestLocale+ (+object+).
386
+ # The type of this field is nilable +LoginOrCreateRequestLocale+ (string enum).
387
387
  #
388
388
  # == Returns:
389
389
  # An object with the following fields:
@@ -443,7 +443,7 @@ module Stytch
443
443
  # The email address of the user to send the one-time passcode to. You may use sandbox@stytch.com to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail.
444
444
  # The type of this field is +String+.
445
445
  # expiration_minutes::
446
- # 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).
446
+ # 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.
447
447
  # The type of this field is nilable +Integer+.
448
448
  # attributes::
449
449
  # Provided attributes help with fraud detection.
@@ -455,7 +455,7 @@ module Stytch
455
455
  #
456
456
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
457
457
  #
458
- # The type of this field is nilable +SendRequestLocale+ (+object+).
458
+ # The type of this field is nilable +SendRequestLocale+ (string enum).
459
459
  # user_id::
460
460
  # The unique ID of a specific User.
461
461
  # The type of this field is nilable +String+.
@@ -523,7 +523,7 @@ module Stytch
523
523
  # The email address of the user to send the one-time passcode to. You may use sandbox@stytch.com to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail.
524
524
  # The type of this field is +String+.
525
525
  # expiration_minutes::
526
- # 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).
526
+ # 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.
527
527
  # The type of this field is nilable +Integer+.
528
528
  # attributes::
529
529
  # Provided attributes help with fraud detection.
@@ -542,7 +542,7 @@ module Stytch
542
542
  #
543
543
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
544
544
  #
545
- # The type of this field is nilable +LoginOrCreateRequestLocale+ (+object+).
545
+ # The type of this field is nilable +LoginOrCreateRequestLocale+ (string enum).
546
546
  # login_template_id::
547
547
  # 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.
548
548
  # The type of this field is nilable +String+.
@@ -197,7 +197,7 @@ module Stytch
197
197
 
198
198
  # This API allows you to check whether or not the user’s provided password is valid, and to provide feedback to the user on how to increase the strength of their password.
199
199
  #
200
- # This endpoint adapts to your Project's password strength configuration. If you're using [zxcvbn](https://stytch.com/docs/passwords#strength-requirements), the default, your passwords are considered valid if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/passwords#strength-requirements), your passwords are considered valid if they meet the requirements that you've set with Stytch. You may update your password strength configuration in the [stytch dashboard](https://stytch.com/dashboard/password-strength-config).
200
+ # This endpoint adapts to your Project's password strength configuration. If you're using [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy), the default, your passwords are considered valid if the strength score is >= 3. If you're using [LUDS](https://stytch.com/docs/guides/passwords/strength-policy), your passwords are considered valid if they meet the requirements that you've set with Stytch. You may update your password strength configuration in the [stytch dashboard](https://stytch.com/dashboard/password-strength-config).
201
201
  #
202
202
  #
203
203
  # ### Password feedback
@@ -265,7 +265,7 @@ module Stytch
265
265
  # The type of this field is +String+.
266
266
  # hash_type::
267
267
  # The password hash used. Currently `bcrypt`, `scrypt`, `argon_2i`, `argon_2id`, `md_5`, `sha_1`, and `pbkdf_2` are supported.
268
- # The type of this field is +MigrateRequestHashType+ (+object+).
268
+ # The type of this field is +MigrateRequestHashType+ (string enum).
269
269
  # md_5_config::
270
270
  # Optional parameters for MD-5 hash types.
271
271
  # The type of this field is nilable +MD5Config+ (+object+).
@@ -383,7 +383,7 @@ module Stytch
383
383
  #
384
384
  # Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")!
385
385
  #
386
- # The type of this field is nilable +ResetStartRequestLocale+ (+object+).
386
+ # The type of this field is nilable +ResetStartRequestLocale+ (string enum).
387
387
  # reset_password_template_id::
388
388
  # Use a custom template for password reset emails. By default, it will use your default email template.
389
389
  # The template must be a template using our built-in customizations or a custom HTML email for Passwords - Password reset.
@@ -624,7 +624,7 @@ module Stytch
624
624
  @connection = connection
625
625
  end
626
626
 
627
- # Reset the user’s password using their existing session. The endpoint will error if the session does not have a password, email magic link, or email OTP authentication factor that has been issued within the last 5 minutes.
627
+ # Reset the user’s password using their existing session. The endpoint will error if the session does not have a password, email magic link, or email OTP authentication factor that has been issued within the last 5 minutes. This endpoint requires either a `session_jwt` or `session_token` be included in the request.
628
628
  #
629
629
  # == Parameters:
630
630
  # password::
@@ -84,6 +84,12 @@ module Stytch
84
84
  # request_id::
85
85
  # 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.
86
86
  # The type of this field is +String+.
87
+ # session::
88
+ # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
89
+ #
90
+ # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
91
+ #
92
+ # The type of this field is +Session+ (+object+).
87
93
  # session_token::
88
94
  # A secret token for a given Stytch Session.
89
95
  # The type of this field is +String+.
@@ -96,12 +102,6 @@ module Stytch
96
102
  # status_code::
97
103
  # 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.
98
104
  # The type of this field is +Integer+.
99
- # session::
100
- # If you initiate a Session, by including `session_duration_minutes` in your authenticate call, you'll receive a full Session object in the response.
101
- #
102
- # See [GET sessions](https://stytch.com/docs/api/session-get) for complete response fields.
103
- #
104
- # The type of this field is nilable +Session+ (+object+).
105
105
  def authenticate(
106
106
  session_token: nil,
107
107
  session_duration_minutes: nil,
@@ -177,7 +177,7 @@ module Stytch
177
177
  get_request(request)
178
178
  end
179
179
 
180
- # MANUAL(authenticate_jwt)(SERVICE_METHOD)
180
+ # MANUAL(Sessions::authenticate_jwt)(SERVICE_METHOD)
181
181
  # ADDIMPORT: require 'jwt'
182
182
  # ADDIMPORT: require 'json/jwt'
183
183
  # ADDIMPORT: require_relative 'errors'
@@ -262,6 +262,6 @@ module Stytch
262
262
  'custom_claims' => custom_claims
263
263
  }
264
264
  end
265
- # ENDMANUAL(authenticate_jwt)
265
+ # ENDMANUAL(Sessions::authenticate_jwt)
266
266
  end
267
267
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '6.0.0'
4
+ VERSION = '6.2.0'
5
5
  end
data/lib/stytch.rb CHANGED
@@ -8,4 +8,5 @@ require_relative 'stytch/middleware'
8
8
  require_relative 'stytch/version'
9
9
 
10
10
  module Stytch end
11
+
11
12
  module StytchB2B end
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: 6.0.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-17 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -80,6 +80,7 @@ extensions: []
80
80
  extra_rdoc_files: []
81
81
  files:
82
82
  - ".github/workflows/auto-publish.yml"
83
+ - ".github/workflows/check-links.yml"
83
84
  - ".github/workflows/ruby.yml"
84
85
  - ".gitignore"
85
86
  - ".rspec"
@@ -97,13 +98,16 @@ files:
97
98
  - lib/stytch/b2b_client.rb
98
99
  - lib/stytch/b2b_discovery.rb
99
100
  - lib/stytch/b2b_magic_links.rb
101
+ - lib/stytch/b2b_oauth.rb
100
102
  - lib/stytch/b2b_organizations.rb
103
+ - lib/stytch/b2b_otp.rb
101
104
  - lib/stytch/b2b_passwords.rb
102
105
  - lib/stytch/b2b_sessions.rb
103
106
  - lib/stytch/b2b_sso.rb
104
107
  - lib/stytch/client.rb
105
108
  - lib/stytch/crypto_wallets.rb
106
109
  - lib/stytch/errors.rb
110
+ - lib/stytch/m2m.rb
107
111
  - lib/stytch/magic_links.rb
108
112
  - lib/stytch/middleware.rb
109
113
  - lib/stytch/oauth.rb