stytch 10.42.0 → 11.0.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/.rubocop.yml +2 -0
- data/lib/stytch/b2b_discovery.rb +4 -4
- data/lib/stytch/b2b_magic_links.rb +8 -11
- data/lib/stytch/b2b_oauth.rb +1 -1
- data/lib/stytch/b2b_organizations.rb +2 -3
- data/lib/stytch/b2b_otp.rb +7 -7
- data/lib/stytch/b2b_passwords.rb +19 -18
- data/lib/stytch/b2b_rbac.rb +6 -0
- data/lib/stytch/b2b_scim.rb +6 -6
- data/lib/stytch/b2b_sessions.rb +1 -3
- data/lib/stytch/b2b_sso.rb +8 -8
- data/lib/stytch/m2m.rb +3 -3
- data/lib/stytch/magic_links.rb +22 -12
- data/lib/stytch/otps.rb +10 -10
- data/lib/stytch/passwords.rb +7 -9
- data/lib/stytch/rbac_local.rb +41 -17
- data/lib/stytch/sessions.rb +0 -2
- data/lib/stytch/version.rb +1 -1
- data/lib/stytch/webauthn.rb +12 -8
- data/stytch.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60e3225a64429c13d844966e708830ad2db104f364760f6473d13b751e7aae4a
|
|
4
|
+
data.tar.gz: 2d87ef251169b3dc01e32c3456d4f258dae467787deefb1c2ddfba3402174bcd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 02dffb3e593f46ac245c225d8828bf9bb305119212b3c0e9473c6ca347da7ddb0bdfaa3412e3e10d3f4d17db89ef5050982037724206675bbcade7614d5e9867
|
|
7
|
+
data.tar.gz: 8fcac4b0ec8b6cbabe22edbd25ce4a44b2b850bae45750e38e6b40fbe73c74cf2b9c134e3df1a2061411723b04060d9bbac59aa7d03004b5fa35481416bf1a17
|
data/.rubocop.yml
CHANGED
|
@@ -19,4 +19,6 @@ Style/StringConcatenation: { Enabled: false }
|
|
|
19
19
|
|
|
20
20
|
RSpec/DescribedClass: { Enabled: false }
|
|
21
21
|
RSpec/ExampleLength: { Enabled: false }
|
|
22
|
+
RSpec/InstanceVariable: { Enabled: false }
|
|
22
23
|
RSpec/MultipleExpectations: { Enabled: false }
|
|
24
|
+
RSpec/MultipleMemoizedHelpers: { Enabled: false }
|
data/lib/stytch/b2b_discovery.rb
CHANGED
|
@@ -71,7 +71,7 @@ module StytchB2B
|
|
|
71
71
|
# locale::
|
|
72
72
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
73
73
|
#
|
|
74
|
-
# Parameter is
|
|
74
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
75
75
|
#
|
|
76
76
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
77
77
|
#
|
|
@@ -337,6 +337,9 @@ module StytchB2B
|
|
|
337
337
|
# member::
|
|
338
338
|
# The [Member object](https://stytch.com/docs/b2b/api/member-object)
|
|
339
339
|
# The type of this field is +Member+ (+object+).
|
|
340
|
+
# organization::
|
|
341
|
+
# The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
|
|
342
|
+
# The type of this field is +Organization+ (+object+).
|
|
340
343
|
# member_authenticated::
|
|
341
344
|
# Indicates whether the Member is fully authenticated. If false, the Member needs to complete an MFA step to log in to the Organization.
|
|
342
345
|
# The type of this field is +Boolean+.
|
|
@@ -349,9 +352,6 @@ module StytchB2B
|
|
|
349
352
|
# member_session::
|
|
350
353
|
# The [Session object](https://stytch.com/docs/b2b/api/session-object).
|
|
351
354
|
# The type of this field is nilable +MemberSession+ (+object+).
|
|
352
|
-
# organization::
|
|
353
|
-
# The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
|
|
354
|
-
# The type of this field is nilable +Organization+ (+object+).
|
|
355
355
|
# mfa_required::
|
|
356
356
|
# Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA.
|
|
357
357
|
# The type of this field is nilable +MfaRequired+ (+object+).
|
|
@@ -69,7 +69,7 @@ module StytchB2B
|
|
|
69
69
|
# locale::
|
|
70
70
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
71
71
|
#
|
|
72
|
-
# Parameter is
|
|
72
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
73
73
|
#
|
|
74
74
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
75
75
|
#
|
|
@@ -214,15 +214,14 @@ module StytchB2B
|
|
|
214
214
|
# A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
|
|
215
215
|
# The type of this field is nilable +String+.
|
|
216
216
|
# login_template_id::
|
|
217
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
218
|
-
# built-in customizations or a custom HTML email for Magic Links - Login.
|
|
217
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”.
|
|
219
218
|
# The type of this field is nilable +String+.
|
|
220
219
|
# signup_template_id::
|
|
221
220
|
# Use a custom template for signup emails. By default, it will use your default email template. The template must be from Stytch's
|
|
222
|
-
# built-in customizations or a custom HTML email for Magic Links - Signup
|
|
221
|
+
# built-in customizations or a custom HTML email for “Magic Links - Signup”.
|
|
223
222
|
# The type of this field is nilable +String+.
|
|
224
223
|
# locale::
|
|
225
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
224
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
226
225
|
#
|
|
227
226
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
228
227
|
#
|
|
@@ -320,11 +319,10 @@ module StytchB2B
|
|
|
320
319
|
# for complete field behavior details.
|
|
321
320
|
# The type of this field is nilable +object+.
|
|
322
321
|
# invite_template_id::
|
|
323
|
-
# Use a custom template for invite emails. By default, it will use your default email template.
|
|
324
|
-
# using our built-in customizations or a custom HTML email for Magic Links - Invite.
|
|
322
|
+
# Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Invite”.
|
|
325
323
|
# The type of this field is nilable +String+.
|
|
326
324
|
# locale::
|
|
327
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
325
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
328
326
|
#
|
|
329
327
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
330
328
|
#
|
|
@@ -414,11 +412,10 @@ module StytchB2B
|
|
|
414
412
|
# A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
|
|
415
413
|
# The type of this field is nilable +String+.
|
|
416
414
|
# login_template_id::
|
|
417
|
-
# Use a custom template for discovery emails. By default, it will use your default email template.
|
|
418
|
-
# built-in customizations or a custom HTML email for Magic Links - Login.
|
|
415
|
+
# Use a custom template for discovery emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”.
|
|
419
416
|
# The type of this field is nilable +String+.
|
|
420
417
|
# locale::
|
|
421
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
418
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
422
419
|
#
|
|
423
420
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
424
421
|
#
|
data/lib/stytch/b2b_oauth.rb
CHANGED
|
@@ -67,7 +67,7 @@ module StytchB2B
|
|
|
67
67
|
# locale::
|
|
68
68
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
69
69
|
#
|
|
70
|
-
# Parameter is
|
|
70
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
71
71
|
#
|
|
72
72
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
73
73
|
#
|
|
@@ -1592,7 +1592,7 @@ module StytchB2B
|
|
|
1592
1592
|
# redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned.
|
|
1593
1593
|
# The type of this field is nilable +String+.
|
|
1594
1594
|
# locale::
|
|
1595
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
1595
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
1596
1596
|
#
|
|
1597
1597
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
1598
1598
|
#
|
|
@@ -1600,8 +1600,7 @@ module StytchB2B
|
|
|
1600
1600
|
#
|
|
1601
1601
|
# The type of this field is nilable +StartEmailUpdateRequestLocale+ (string enum).
|
|
1602
1602
|
# login_template_id::
|
|
1603
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
1604
|
-
# built-in customizations or a custom HTML email for Magic Links - Login.
|
|
1603
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”.
|
|
1605
1604
|
# The type of this field is nilable +String+.
|
|
1606
1605
|
# delivery_method::
|
|
1607
1606
|
# The method that should be used to verify a member's new email address. The options are `EMAIL_MAGIC_LINK` or `EMAIL_OTP`. This field is optional, if no value is provided, `EMAIL_MAGIC_LINK` will be used.
|
data/lib/stytch/b2b_otp.rb
CHANGED
|
@@ -60,7 +60,7 @@ module StytchB2B
|
|
|
60
60
|
# The phone number to send the OTP to. If the Member already has a phone number, this argument is not needed.
|
|
61
61
|
# The type of this field is nilable +String+.
|
|
62
62
|
# locale::
|
|
63
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
63
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
64
64
|
#
|
|
65
65
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
66
66
|
#
|
|
@@ -271,13 +271,13 @@ module StytchB2B
|
|
|
271
271
|
# The email address of the Member.
|
|
272
272
|
# The type of this field is +String+.
|
|
273
273
|
# login_template_id::
|
|
274
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
274
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”.
|
|
275
275
|
# The type of this field is nilable +String+.
|
|
276
276
|
# signup_template_id::
|
|
277
|
-
# Use a custom template for signup emails. By default, it will use your default email template.
|
|
277
|
+
# Use a custom template for signup emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Signup”.
|
|
278
278
|
# The type of this field is nilable +String+.
|
|
279
279
|
# locale::
|
|
280
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
280
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
281
281
|
#
|
|
282
282
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
283
283
|
#
|
|
@@ -384,7 +384,7 @@ module StytchB2B
|
|
|
384
384
|
# Total custom claims size cannot exceed four kilobytes.
|
|
385
385
|
# The type of this field is nilable +object+.
|
|
386
386
|
# locale::
|
|
387
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
387
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
388
388
|
#
|
|
389
389
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
390
390
|
#
|
|
@@ -485,10 +485,10 @@ module StytchB2B
|
|
|
485
485
|
# The email address to start the discovery flow for.
|
|
486
486
|
# The type of this field is +String+.
|
|
487
487
|
# login_template_id::
|
|
488
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
488
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”.
|
|
489
489
|
# The type of this field is nilable +String+.
|
|
490
490
|
# locale::
|
|
491
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
491
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
492
492
|
#
|
|
493
493
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
494
494
|
#
|
data/lib/stytch/b2b_passwords.rb
CHANGED
|
@@ -52,7 +52,8 @@ module StytchB2B
|
|
|
52
52
|
# valid_password::
|
|
53
53
|
# Returns `true` if the password passes our password validation. We offer two validation options,
|
|
54
54
|
# [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of sophistication.
|
|
55
|
-
# We also offer [LUDS](https://stytch.com/docs/b2b/guides/passwords/strength-policy)
|
|
55
|
+
# We also offer [LUDS](https://stytch.com/docs/b2b/guides/passwords/strength-policy) which is less sophisticated
|
|
56
|
+
# but easier to understand. If an email address is included in the call we also
|
|
56
57
|
# require that the password hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/)
|
|
57
58
|
# The type of this field is +Boolean+.
|
|
58
59
|
# score::
|
|
@@ -66,7 +67,7 @@ module StytchB2B
|
|
|
66
67
|
# The type of this field is +String+.
|
|
67
68
|
# breach_detection_on_create::
|
|
68
69
|
# Will return `true` if breach detection will be evaluated. By default this option is enabled.
|
|
69
|
-
# This option can be disabled
|
|
70
|
+
# This option can be disabled in the [dashboard](https://stytch.com/dashboard/password-strength-config#breach-detection).
|
|
70
71
|
# If this value is false then `breached_password` will always be `false` as well.
|
|
71
72
|
# The type of this field is +Boolean+.
|
|
72
73
|
# status_code::
|
|
@@ -282,7 +283,7 @@ module StytchB2B
|
|
|
282
283
|
# locale::
|
|
283
284
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
284
285
|
#
|
|
285
|
-
# Parameter is
|
|
286
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
286
287
|
#
|
|
287
288
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
288
289
|
#
|
|
@@ -411,9 +412,9 @@ module StytchB2B
|
|
|
411
412
|
# The email address of the Member to start the email reset process for.
|
|
412
413
|
# The type of this field is +String+.
|
|
413
414
|
# reset_password_redirect_url::
|
|
414
|
-
# The URL that the Member
|
|
415
|
-
#
|
|
416
|
-
# If you have not set a default
|
|
415
|
+
# The URL that the Member is redirected to from the reset password magic link. This URL should display your application's reset password page.
|
|
416
|
+
# Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint.
|
|
417
|
+
# If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned.
|
|
417
418
|
# The type of this field is nilable +String+.
|
|
418
419
|
# reset_password_expiration_minutes::
|
|
419
420
|
# Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes.
|
|
@@ -427,7 +428,7 @@ module StytchB2B
|
|
|
427
428
|
# After Members are redirected to the login redirect URL, your application should retrieve the `token` value from the URL parameters and call the [Magic Link Authenticate endpoint](https://stytch.com/docs/api/authenticate-magic-link) to log the Member in without requiring a password reset. If this value is not provided, your project's default login redirect URL will be used. If you have not set a default login redirect URL, an error will be returned.
|
|
428
429
|
# The type of this field is nilable +String+.
|
|
429
430
|
# locale::
|
|
430
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
431
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
431
432
|
#
|
|
432
433
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
433
434
|
#
|
|
@@ -435,11 +436,11 @@ module StytchB2B
|
|
|
435
436
|
#
|
|
436
437
|
# The type of this field is nilable +ResetStartRequestLocale+ (string enum).
|
|
437
438
|
# reset_password_template_id::
|
|
438
|
-
# Use a custom template for reset password emails. By default, it will use your default email template.
|
|
439
|
+
# Use a custom template for reset password emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Reset Password”.
|
|
439
440
|
# The type of this field is nilable +String+.
|
|
440
441
|
# verify_email_template_id::
|
|
441
442
|
# Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are enabled for your Project, this template will be used the first time a user sets a password via a
|
|
442
|
-
# password reset flow. By default, it will use your default email template.
|
|
443
|
+
# password reset flow. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Email Verification”.
|
|
443
444
|
# The type of this field is nilable +String+.
|
|
444
445
|
#
|
|
445
446
|
# == Returns:
|
|
@@ -539,7 +540,7 @@ module StytchB2B
|
|
|
539
540
|
# locale::
|
|
540
541
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
541
542
|
#
|
|
542
|
-
# Parameter is
|
|
543
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
543
544
|
#
|
|
544
545
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
545
546
|
#
|
|
@@ -725,7 +726,7 @@ module StytchB2B
|
|
|
725
726
|
# Total custom claims size cannot exceed four kilobytes.
|
|
726
727
|
# The type of this field is nilable +object+.
|
|
727
728
|
# locale::
|
|
728
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
729
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
729
730
|
#
|
|
730
731
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
731
732
|
#
|
|
@@ -863,7 +864,7 @@ module StytchB2B
|
|
|
863
864
|
# locale::
|
|
864
865
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
865
866
|
#
|
|
866
|
-
# Parameter is
|
|
867
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
867
868
|
#
|
|
868
869
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
869
870
|
#
|
|
@@ -1030,9 +1031,9 @@ module StytchB2B
|
|
|
1030
1031
|
# The email address of the Member to start the email reset process for.
|
|
1031
1032
|
# The type of this field is +String+.
|
|
1032
1033
|
# reset_password_redirect_url::
|
|
1033
|
-
# The URL that the Member
|
|
1034
|
-
#
|
|
1035
|
-
# If you have not set a default
|
|
1034
|
+
# The URL that the Member is redirected to from the reset password magic link. This URL should display your application's reset password page.
|
|
1035
|
+
# Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint.
|
|
1036
|
+
# If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned.
|
|
1036
1037
|
# The type of this field is nilable +String+.
|
|
1037
1038
|
# discovery_redirect_url::
|
|
1038
1039
|
# The URL that the end user clicks from the discovery Magic Link. This URL should be an endpoint in the backend server that
|
|
@@ -1040,7 +1041,7 @@ module StytchB2B
|
|
|
1040
1041
|
# discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned.
|
|
1041
1042
|
# The type of this field is nilable +String+.
|
|
1042
1043
|
# reset_password_template_id::
|
|
1043
|
-
# Use a custom template for reset password emails. By default, it will use your default email template.
|
|
1044
|
+
# Use a custom template for reset password emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Reset Password”.
|
|
1044
1045
|
# The type of this field is nilable +String+.
|
|
1045
1046
|
# reset_password_expiration_minutes::
|
|
1046
1047
|
# Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes.
|
|
@@ -1049,7 +1050,7 @@ module StytchB2B
|
|
|
1049
1050
|
# (no documentation yet)
|
|
1050
1051
|
# The type of this field is nilable +String+.
|
|
1051
1052
|
# locale::
|
|
1052
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
1053
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
1053
1054
|
#
|
|
1054
1055
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
1055
1056
|
#
|
|
@@ -1058,7 +1059,7 @@ module StytchB2B
|
|
|
1058
1059
|
# The type of this field is nilable +String+.
|
|
1059
1060
|
# verify_email_template_id::
|
|
1060
1061
|
# Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are enabled for your Project, this template will be used the first time a user sets a password via a
|
|
1061
|
-
# password reset flow. By default, it will use your default email template.
|
|
1062
|
+
# password reset flow. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Email Verification”.
|
|
1062
1063
|
# The type of this field is nilable +String+.
|
|
1063
1064
|
#
|
|
1064
1065
|
# == Returns:
|
data/lib/stytch/b2b_rbac.rb
CHANGED
|
@@ -55,6 +55,9 @@ module StytchB2B
|
|
|
55
55
|
@connection = connection
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
#
|
|
59
|
+
# The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com to request access.
|
|
60
|
+
#
|
|
58
61
|
# Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains the roles that have been defined specifically for that organization, allowing for organization-specific permissioning models.
|
|
59
62
|
#
|
|
60
63
|
# This endpoint returns the organization-scoped roles that supplement the project-level RBAC policy. Organization policies allow you to define custom roles that are specific to individual organizations within your project.
|
|
@@ -90,6 +93,9 @@ module StytchB2B
|
|
|
90
93
|
get_request(request, headers)
|
|
91
94
|
end
|
|
92
95
|
|
|
96
|
+
#
|
|
97
|
+
# The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com to request access.
|
|
98
|
+
#
|
|
93
99
|
# Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to define roles that are specific to that organization, providing fine-grained control over permissions at the organization level.
|
|
94
100
|
#
|
|
95
101
|
# This endpoint allows you to create, update, or replace the organization-scoped roles for a given organization. Organization policies supplement the project-level RBAC policy with additional roles that are only applicable within the context of that specific organization.
|
data/lib/stytch/b2b_scim.rb
CHANGED
|
@@ -206,7 +206,7 @@ module StytchB2B
|
|
|
206
206
|
# 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.
|
|
207
207
|
# The type of this field is +Integer+.
|
|
208
208
|
# connection::
|
|
209
|
-
# The
|
|
209
|
+
# The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object).
|
|
210
210
|
# The type of this field is nilable +SCIMConnection+ (+object+).
|
|
211
211
|
#
|
|
212
212
|
# == Method Options:
|
|
@@ -282,7 +282,7 @@ module StytchB2B
|
|
|
282
282
|
# 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.
|
|
283
283
|
# The type of this field is +Integer+.
|
|
284
284
|
# connection::
|
|
285
|
-
# The
|
|
285
|
+
# The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object).
|
|
286
286
|
# The type of this field is nilable +SCIMConnectionWithNextToken+ (+object+).
|
|
287
287
|
#
|
|
288
288
|
# == Method Options:
|
|
@@ -318,7 +318,7 @@ module StytchB2B
|
|
|
318
318
|
# 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.
|
|
319
319
|
# The type of this field is +Integer+.
|
|
320
320
|
# connection::
|
|
321
|
-
# The
|
|
321
|
+
# The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object).
|
|
322
322
|
# The type of this field is nilable +SCIMConnection+ (+object+).
|
|
323
323
|
#
|
|
324
324
|
# == Method Options:
|
|
@@ -354,7 +354,7 @@ module StytchB2B
|
|
|
354
354
|
# 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.
|
|
355
355
|
# The type of this field is +Integer+.
|
|
356
356
|
# connection::
|
|
357
|
-
# The
|
|
357
|
+
# The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object).
|
|
358
358
|
# The type of this field is nilable +SCIMConnection+ (+object+).
|
|
359
359
|
#
|
|
360
360
|
# == Method Options:
|
|
@@ -440,7 +440,7 @@ module StytchB2B
|
|
|
440
440
|
# 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.
|
|
441
441
|
# The type of this field is +Integer+.
|
|
442
442
|
# connection::
|
|
443
|
-
# The
|
|
443
|
+
# The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object).
|
|
444
444
|
# The type of this field is nilable +SCIMConnectionWithToken+ (+object+).
|
|
445
445
|
#
|
|
446
446
|
# == Method Options:
|
|
@@ -476,7 +476,7 @@ module StytchB2B
|
|
|
476
476
|
# 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.
|
|
477
477
|
# The type of this field is +Integer+.
|
|
478
478
|
# connection::
|
|
479
|
-
#
|
|
479
|
+
# The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object).
|
|
480
480
|
# The type of this field is nilable +SCIMConnection+ (+object+).
|
|
481
481
|
#
|
|
482
482
|
# == Method Options:
|
data/lib/stytch/b2b_sessions.rb
CHANGED
|
@@ -266,7 +266,7 @@ module StytchB2B
|
|
|
266
266
|
# locale::
|
|
267
267
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
268
268
|
#
|
|
269
|
-
# Parameter is
|
|
269
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
270
270
|
#
|
|
271
271
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
272
272
|
#
|
|
@@ -346,8 +346,6 @@ module StytchB2B
|
|
|
346
346
|
#
|
|
347
347
|
# The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than 5 minutes old. Access Tokens may only be exchanged a single time.
|
|
348
348
|
#
|
|
349
|
-
# The Member Session returned will be the same Member Session that was active in your application (the authorizing party) during the initial authorization flow.
|
|
350
|
-
#
|
|
351
349
|
# Because the Member previously completed MFA and satisfied all Organization authentication requirements at the time of the original Access Token issuance, this endpoint will never return an `intermediate_session_token` or require MFA.
|
|
352
350
|
#
|
|
353
351
|
# == Parameters:
|
data/lib/stytch/b2b_sso.rb
CHANGED
|
@@ -178,7 +178,7 @@ module StytchB2B
|
|
|
178
178
|
# locale::
|
|
179
179
|
# If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode.
|
|
180
180
|
#
|
|
181
|
-
# Parameter is
|
|
181
|
+
# Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
182
182
|
#
|
|
183
183
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
184
184
|
#
|
|
@@ -335,7 +335,7 @@ module StytchB2B
|
|
|
335
335
|
# 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.
|
|
336
336
|
# The type of this field is +Integer+.
|
|
337
337
|
# connection::
|
|
338
|
-
# The
|
|
338
|
+
# The [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object).
|
|
339
339
|
# The type of this field is nilable +OIDCConnection+ (+object+).
|
|
340
340
|
#
|
|
341
341
|
# == Method Options:
|
|
@@ -426,7 +426,7 @@ module StytchB2B
|
|
|
426
426
|
# 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.
|
|
427
427
|
# The type of this field is +Integer+.
|
|
428
428
|
# connection::
|
|
429
|
-
# The
|
|
429
|
+
# The [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object).
|
|
430
430
|
# The type of this field is nilable +OIDCConnection+ (+object+).
|
|
431
431
|
# warning::
|
|
432
432
|
# If it is not possible to resolve the well-known metadata document from the OIDC issuer, this field will explain what went wrong if the request is successful otherwise. In other words, even if the overall request succeeds, there could be relevant warnings related to the connection update.
|
|
@@ -595,7 +595,7 @@ module StytchB2B
|
|
|
595
595
|
# 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.
|
|
596
596
|
# The type of this field is +Integer+.
|
|
597
597
|
# connection::
|
|
598
|
-
# The
|
|
598
|
+
# The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object)
|
|
599
599
|
# The type of this field is nilable +SAMLConnection+ (+object+).
|
|
600
600
|
#
|
|
601
601
|
# == Method Options:
|
|
@@ -691,7 +691,7 @@ module StytchB2B
|
|
|
691
691
|
# 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.
|
|
692
692
|
# The type of this field is +Integer+.
|
|
693
693
|
# connection::
|
|
694
|
-
# The
|
|
694
|
+
# The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object)
|
|
695
695
|
# The type of this field is nilable +SAMLConnection+ (+object+).
|
|
696
696
|
#
|
|
697
697
|
# == Method Options:
|
|
@@ -766,7 +766,7 @@ module StytchB2B
|
|
|
766
766
|
# 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.
|
|
767
767
|
# The type of this field is +Integer+.
|
|
768
768
|
# connection::
|
|
769
|
-
# The
|
|
769
|
+
# The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object)
|
|
770
770
|
# The type of this field is nilable +SAMLConnection+ (+object+).
|
|
771
771
|
#
|
|
772
772
|
# == Method Options:
|
|
@@ -941,7 +941,7 @@ module StytchB2B
|
|
|
941
941
|
# 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.
|
|
942
942
|
# The type of this field is +Integer+.
|
|
943
943
|
# connection::
|
|
944
|
-
# The
|
|
944
|
+
# The [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object).
|
|
945
945
|
# The type of this field is nilable +Connection+ (+object+).
|
|
946
946
|
#
|
|
947
947
|
# == Method Options:
|
|
@@ -1001,7 +1001,7 @@ module StytchB2B
|
|
|
1001
1001
|
# 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.
|
|
1002
1002
|
# The type of this field is +Integer+.
|
|
1003
1003
|
# connection::
|
|
1004
|
-
# The
|
|
1004
|
+
# The [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object).
|
|
1005
1005
|
# The type of this field is nilable +Connection+ (+object+).
|
|
1006
1006
|
#
|
|
1007
1007
|
# == Method Options:
|
data/lib/stytch/m2m.rb
CHANGED
|
@@ -289,9 +289,9 @@ module Stytch
|
|
|
289
289
|
post_request('/v1/m2m/clients/search', request, headers)
|
|
290
290
|
end
|
|
291
291
|
|
|
292
|
-
# Updates an existing M2M Client. You can use this endpoint to activate or deactivate
|
|
292
|
+
# Updates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated.
|
|
293
293
|
#
|
|
294
|
-
# **Important:** Deactivating
|
|
294
|
+
# **Important:** Deactivating an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones.
|
|
295
295
|
# To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token).
|
|
296
296
|
#
|
|
297
297
|
# == Parameters:
|
|
@@ -346,7 +346,7 @@ module Stytch
|
|
|
346
346
|
|
|
347
347
|
# Deletes the M2M Client.
|
|
348
348
|
#
|
|
349
|
-
# **Important:** Deleting
|
|
349
|
+
# **Important:** Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones.
|
|
350
350
|
# To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token).
|
|
351
351
|
#
|
|
352
352
|
# == Parameters:
|
data/lib/stytch/magic_links.rb
CHANGED
|
@@ -126,12 +126,22 @@ module Stytch
|
|
|
126
126
|
post_request('/v1/magic_links/authenticate', request, headers)
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
# Create an Embeddable Magic Link token for a User.
|
|
129
|
+
# Create an Embeddable Magic Link token for a User.
|
|
130
130
|
#
|
|
131
|
-
# ###
|
|
132
|
-
# Send the returned `token` value to the end user in a link which directs to your application. When the end user follows your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) to complete authentication.
|
|
131
|
+
# ### Important usage notes
|
|
133
132
|
#
|
|
134
|
-
#
|
|
133
|
+
# Carefully review the following notes before using Embeddable Magic Links:
|
|
134
|
+
#
|
|
135
|
+
# * Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely.
|
|
136
|
+
# * Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone number) as verified, since we cannot confirm how the token was sent to the user.
|
|
137
|
+
# * Embeddable Magic Links are only available in our Consumer API, and not our B2B API.
|
|
138
|
+
#
|
|
139
|
+
# When sending Embeddable Magic Links via email:
|
|
140
|
+
#
|
|
141
|
+
# * Deliverability is paramount. Carefully test your email copy to ensure it reaches your users' inboxes. Small changes can result in your emails being sent to spam.
|
|
142
|
+
# * In some cases, email security bots may follow links within incoming emails before your users open them. This consumes the Embeddable Magic Link token, preventing the user from logging in when they later click the link. Our Email Magic Links product automatically prevents this (details [here](https://stytch.com/docs/consumer-auth/authentication/magic-links/redirect-routing)). However, when sending your own emails containing Embeddable Magic Links, you'll be responsible for detecting and stopping bot traffic using tools like CAPTCHA or [Device Fingerprinting](https://stytch.com/docs/fraud-risk/device-fingerprinting/overview).
|
|
143
|
+
#
|
|
144
|
+
# We also recommend checking out our [Trusted Auth Tokens](https://stytch.com/docs/consumer-auth/authentication/trusted-auth-tokens/overview) product, which is available in both our Consumer and B2B APIs and can be a better fit for some use cases.
|
|
135
145
|
#
|
|
136
146
|
# == Parameters:
|
|
137
147
|
# user_id::
|
|
@@ -193,7 +203,7 @@ module Stytch
|
|
|
193
203
|
# The email address of the User to send the Magic Link to.
|
|
194
204
|
# The type of this field is +String+.
|
|
195
205
|
# login_template_id::
|
|
196
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
206
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”.
|
|
197
207
|
# The type of this field is nilable +String+.
|
|
198
208
|
# attributes::
|
|
199
209
|
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
|
@@ -223,7 +233,7 @@ module Stytch
|
|
|
223
233
|
# The `session_jwt` of the user to associate the email with.
|
|
224
234
|
# The type of this field is nilable +String+.
|
|
225
235
|
# locale::
|
|
226
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
236
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
227
237
|
#
|
|
228
238
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
229
239
|
#
|
|
@@ -231,7 +241,7 @@ module Stytch
|
|
|
231
241
|
#
|
|
232
242
|
# The type of this field is nilable +SendRequestLocale+ (string enum).
|
|
233
243
|
# signup_template_id::
|
|
234
|
-
# Use a custom template for sign-up emails. By default, it will use your default email template.
|
|
244
|
+
# Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”.
|
|
235
245
|
# The type of this field is nilable +String+.
|
|
236
246
|
#
|
|
237
247
|
# == Returns:
|
|
@@ -305,10 +315,10 @@ module Stytch
|
|
|
305
315
|
# Set the expiration for the sign-up email magic link, in minutes. By default, it expires in 1 week. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins).
|
|
306
316
|
# The type of this field is nilable +Integer+.
|
|
307
317
|
# login_template_id::
|
|
308
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
318
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”.
|
|
309
319
|
# The type of this field is nilable +String+.
|
|
310
320
|
# signup_template_id::
|
|
311
|
-
# Use a custom template for sign-up emails. By default, it will use your default email template.
|
|
321
|
+
# Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”.
|
|
312
322
|
# The type of this field is nilable +String+.
|
|
313
323
|
# attributes::
|
|
314
324
|
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
|
@@ -324,7 +334,7 @@ module Stytch
|
|
|
324
334
|
# A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device.
|
|
325
335
|
# The type of this field is nilable +String+.
|
|
326
336
|
# locale::
|
|
327
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
337
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
328
338
|
#
|
|
329
339
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
330
340
|
#
|
|
@@ -390,7 +400,7 @@ module Stytch
|
|
|
390
400
|
# The email address of the User to send the invite Magic Link to.
|
|
391
401
|
# The type of this field is +String+.
|
|
392
402
|
# invite_template_id::
|
|
393
|
-
# Use a custom template for invite emails. By default, it will use your default email template.
|
|
403
|
+
# Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Invite”.
|
|
394
404
|
# The type of this field is nilable +String+.
|
|
395
405
|
# attributes::
|
|
396
406
|
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
|
@@ -405,7 +415,7 @@ module Stytch
|
|
|
405
415
|
# Set the expiration for the email magic link, in minutes. By default, it expires in 1 hour. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins).
|
|
406
416
|
# The type of this field is nilable +Integer+.
|
|
407
417
|
# locale::
|
|
408
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
418
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
409
419
|
#
|
|
410
420
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
411
421
|
#
|
data/lib/stytch/otps.rb
CHANGED
|
@@ -161,7 +161,7 @@ module Stytch
|
|
|
161
161
|
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
|
162
162
|
# The type of this field is nilable +Attributes+ (+object+).
|
|
163
163
|
# locale::
|
|
164
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
164
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
165
165
|
#
|
|
166
166
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
167
167
|
#
|
|
@@ -246,7 +246,7 @@ module Stytch
|
|
|
246
246
|
# an account for them.
|
|
247
247
|
# The type of this field is nilable +Boolean+.
|
|
248
248
|
# locale::
|
|
249
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
249
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
250
250
|
#
|
|
251
251
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
252
252
|
#
|
|
@@ -324,7 +324,7 @@ module Stytch
|
|
|
324
324
|
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
|
325
325
|
# The type of this field is nilable +Attributes+ (+object+).
|
|
326
326
|
# locale::
|
|
327
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
327
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
328
328
|
#
|
|
329
329
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
330
330
|
#
|
|
@@ -405,7 +405,7 @@ module Stytch
|
|
|
405
405
|
# an account for them.
|
|
406
406
|
# The type of this field is nilable +Boolean+.
|
|
407
407
|
# locale::
|
|
408
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
408
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
409
409
|
#
|
|
410
410
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
411
411
|
#
|
|
@@ -476,7 +476,7 @@ module Stytch
|
|
|
476
476
|
# Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
|
|
477
477
|
# The type of this field is nilable +Attributes+ (+object+).
|
|
478
478
|
# locale::
|
|
479
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
479
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
480
480
|
#
|
|
481
481
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
482
482
|
#
|
|
@@ -493,10 +493,10 @@ module Stytch
|
|
|
493
493
|
# The `session_jwt` associated with a User's existing Session.
|
|
494
494
|
# The type of this field is nilable +String+.
|
|
495
495
|
# login_template_id::
|
|
496
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
496
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”.
|
|
497
497
|
# The type of this field is nilable +String+.
|
|
498
498
|
# signup_template_id::
|
|
499
|
-
# Use a custom template for sign-up emails. By default, it will use your default email template.
|
|
499
|
+
# Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Sign-up”.
|
|
500
500
|
# The type of this field is nilable +String+.
|
|
501
501
|
#
|
|
502
502
|
# == Returns:
|
|
@@ -564,7 +564,7 @@ module Stytch
|
|
|
564
564
|
# an account for them.
|
|
565
565
|
# The type of this field is nilable +Boolean+.
|
|
566
566
|
# locale::
|
|
567
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
567
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
568
568
|
#
|
|
569
569
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
570
570
|
#
|
|
@@ -572,10 +572,10 @@ module Stytch
|
|
|
572
572
|
#
|
|
573
573
|
# The type of this field is nilable +LoginOrCreateRequestLocale+ (string enum).
|
|
574
574
|
# login_template_id::
|
|
575
|
-
# Use a custom template for login emails. By default, it will use your default email template.
|
|
575
|
+
# Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”.
|
|
576
576
|
# The type of this field is nilable +String+.
|
|
577
577
|
# signup_template_id::
|
|
578
|
-
# Use a custom template for sign-up emails. By default, it will use your default email template.
|
|
578
|
+
# Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”.
|
|
579
579
|
# The type of this field is nilable +String+.
|
|
580
580
|
#
|
|
581
581
|
# == Returns:
|
data/lib/stytch/passwords.rb
CHANGED
|
@@ -242,7 +242,7 @@ module Stytch
|
|
|
242
242
|
# 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.
|
|
243
243
|
# The type of this field is +String+.
|
|
244
244
|
# valid_password::
|
|
245
|
-
# Returns `true` if the password passes our password validation. We offer two validation options, [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of sophistication. We also offer [LUDS](https://stytch.com/docs/guides/passwords/strength-policy). If an email address is included in the call we also require that the password hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/).
|
|
245
|
+
# Returns `true` if the password passes our password validation. We offer two validation options, [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of sophistication. We also offer [LUDS](https://stytch.com/docs/guides/passwords/strength-policy) which is less sophisticated but easier to understand. If an email address is included in the call we also require that the password hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/).
|
|
246
246
|
# The type of this field is +Boolean+.
|
|
247
247
|
# score::
|
|
248
248
|
# The score of the password determined by [zxcvbn](https://github.com/dropbox/zxcvbn). Values will be between 1 and 4, a 3 or greater is required to pass validation.
|
|
@@ -254,7 +254,7 @@ module Stytch
|
|
|
254
254
|
# The strength policy type enforced, either `zxcvbn` or `luds`.
|
|
255
255
|
# The type of this field is +String+.
|
|
256
256
|
# breach_detection_on_create::
|
|
257
|
-
# Will return `true` if breach detection will be evaluated. By default this option is enabled. This option can be disabled
|
|
257
|
+
# Will return `true` if breach detection will be evaluated. By default this option is enabled. This option can be disabled in the [dashboard](https://stytch.com/dashboard/password-strength-config#breach-detection). If this value is `false` then `breached_password` will always be `false` as well.
|
|
258
258
|
# The type of this field is +Boolean+.
|
|
259
259
|
# status_code::
|
|
260
260
|
# 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.
|
|
@@ -411,11 +411,9 @@ module Stytch
|
|
|
411
411
|
# The email of the User that requested the password reset.
|
|
412
412
|
# The type of this field is +String+.
|
|
413
413
|
# reset_password_redirect_url::
|
|
414
|
-
# The
|
|
415
|
-
#
|
|
416
|
-
#
|
|
417
|
-
# If this value is not passed, the default reset password redirect URL that you set in your Dashboard is used.
|
|
418
|
-
# If you have not set a default reset password redirect URL, an error is returned.
|
|
414
|
+
# The URL that the User is redirected to from the reset password magic link. This URL should display your application's reset password page.
|
|
415
|
+
# Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint.
|
|
416
|
+
# If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned.
|
|
419
417
|
# The type of this field is nilable +String+.
|
|
420
418
|
# reset_password_expiration_minutes::
|
|
421
419
|
# Set the expiration for the password reset, in minutes. By default, it expires in 30 minutes.
|
|
@@ -433,7 +431,7 @@ module Stytch
|
|
|
433
431
|
# After Users are redirected to the login redirect URL, your application should retrieve the `token` value from the URL parameters and call the [Magic Link Authenticate endpoint](https://stytch.com/docs/api/authenticate-magic-link) to log the User in without requiring a password reset. If this value is not provided, your project's default login redirect URL will be used. If you have not set a default login redirect URL, an error will be returned.
|
|
434
432
|
# The type of this field is nilable +String+.
|
|
435
433
|
# locale::
|
|
436
|
-
# Used to determine which language to use when sending the user this delivery method. Parameter is
|
|
434
|
+
# Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`.
|
|
437
435
|
#
|
|
438
436
|
# Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English.
|
|
439
437
|
#
|
|
@@ -442,7 +440,7 @@ module Stytch
|
|
|
442
440
|
# The type of this field is nilable +ResetStartRequestLocale+ (string enum).
|
|
443
441
|
# reset_password_template_id::
|
|
444
442
|
# Use a custom template for password reset emails. By default, it will use your default email template.
|
|
445
|
-
#
|
|
443
|
+
# Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Password reset”.
|
|
446
444
|
# The type of this field is nilable +String+.
|
|
447
445
|
#
|
|
448
446
|
# == Returns:
|
data/lib/stytch/rbac_local.rb
CHANGED
|
@@ -9,6 +9,10 @@ module Stytch
|
|
|
9
9
|
@rbac_client = rbac_client
|
|
10
10
|
@policy_last_update = 0
|
|
11
11
|
@cached_policy = nil
|
|
12
|
+
@cached_org_policies = {}
|
|
13
|
+
# TTL, in seconds, before a cached policy is considered stale
|
|
14
|
+
# and should be refreshed. Amounts to 5 minutes.
|
|
15
|
+
@cache_ttl = 300
|
|
12
16
|
end
|
|
13
17
|
|
|
14
18
|
def reload_policy
|
|
@@ -16,11 +20,27 @@ module Stytch
|
|
|
16
20
|
@policy_last_update = Time.now.to_i
|
|
17
21
|
end
|
|
18
22
|
|
|
23
|
+
def reload_org_policy(organization_id:)
|
|
24
|
+
@cached_org_policies[organization_id] = CachedOrgPolicy.new(
|
|
25
|
+
org_policy: @rbac_client.organizations.get_org_policy(organization_id: organization_id)
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
19
29
|
def get_policy(invalidate: false)
|
|
20
|
-
reload_policy if invalidate || @cached_policy.nil? || @policy_last_update < Time.now.to_i -
|
|
30
|
+
reload_policy if invalidate || @cached_policy.nil? || @policy_last_update < Time.now.to_i - @cache_ttl
|
|
21
31
|
@cached_policy
|
|
22
32
|
end
|
|
23
33
|
|
|
34
|
+
def get_org_policy(organization_id:, invalidate: false)
|
|
35
|
+
is_missing = @cached_org_policies[organization_id].nil?
|
|
36
|
+
is_stale = !is_missing && @cached_org_policies[organization_id].last_update < Time.now.to_i - @cache_ttl
|
|
37
|
+
reload_org_policy(organization_id: organization_id) if invalidate || is_missing || is_stale
|
|
38
|
+
|
|
39
|
+
return { 'roles' => [] } if @cached_org_policies[organization_id].nil?
|
|
40
|
+
|
|
41
|
+
@cached_org_policies[organization_id].org_policy
|
|
42
|
+
end
|
|
43
|
+
|
|
24
44
|
# Performs an authorization check against the project's policy and a set of roles. If the
|
|
25
45
|
# check succeeds, this method will return. If the check fails, a PermissionError
|
|
26
46
|
# will be raised. It's also possible for a TenancyError to be raised if the
|
|
@@ -34,19 +54,18 @@ module Stytch
|
|
|
34
54
|
raise Stytch::TenancyError.new(subject_org_id, authorization_check['organization_id']) if subject_org_id != authorization_check['organization_id']
|
|
35
55
|
|
|
36
56
|
policy = get_policy
|
|
57
|
+
org_policy = get_org_policy(organization_id: subject_org_id)
|
|
58
|
+
all_roles = policy['roles'].concat(org_policy['roles'])
|
|
37
59
|
|
|
38
|
-
|
|
60
|
+
return if all_roles.any? do |role|
|
|
39
61
|
next unless subject_roles.include?(role['role_id'])
|
|
40
62
|
|
|
41
|
-
|
|
63
|
+
role['permissions'].any? do |permission|
|
|
42
64
|
actions = permission['actions']
|
|
43
65
|
resource = permission['resource_id']
|
|
44
66
|
has_matching_action = actions.include?('*') || actions.include?(authorization_check['action'])
|
|
45
67
|
has_matching_resource = resource == authorization_check['resource_id']
|
|
46
|
-
|
|
47
|
-
# All good
|
|
48
|
-
return
|
|
49
|
-
end
|
|
68
|
+
has_matching_action && has_matching_resource
|
|
50
69
|
end
|
|
51
70
|
end
|
|
52
71
|
|
|
@@ -64,17 +83,15 @@ module Stytch
|
|
|
64
83
|
policy = get_policy
|
|
65
84
|
|
|
66
85
|
# For consumer authorization, we check roles without tenancy validation
|
|
67
|
-
|
|
86
|
+
return if policy['roles'].any? do |role|
|
|
68
87
|
next unless subject_roles.include?(role['role_id'])
|
|
69
88
|
|
|
70
|
-
|
|
89
|
+
role['permissions'].any? do |permission|
|
|
71
90
|
actions = permission['actions']
|
|
72
91
|
resource = permission['resource_id']
|
|
73
92
|
has_matching_action = actions.include?('*') || actions.include?(authorization_check['action'])
|
|
74
93
|
has_matching_resource = resource == authorization_check['resource_id']
|
|
75
|
-
|
|
76
|
-
return # Permission granted
|
|
77
|
-
end
|
|
94
|
+
has_matching_action && has_matching_resource
|
|
78
95
|
end
|
|
79
96
|
end
|
|
80
97
|
|
|
@@ -98,19 +115,17 @@ module Stytch
|
|
|
98
115
|
resource_id = authorization_check['resource_id']
|
|
99
116
|
|
|
100
117
|
# Check if any of the token scopes grant permission for this action/resource
|
|
101
|
-
|
|
118
|
+
return if policy['scopes'].any? do |scope_obj|
|
|
102
119
|
scope_name = scope_obj['scope']
|
|
103
120
|
next unless token_scopes.include?(scope_name)
|
|
104
121
|
|
|
105
122
|
# Check if this scope grants permission for the requested action/resource
|
|
106
|
-
|
|
123
|
+
scope_obj['permissions'].any? do |permission|
|
|
107
124
|
actions = permission['actions']
|
|
108
125
|
resource = permission['resource_id']
|
|
109
126
|
has_matching_action = actions.include?('*') || actions.include?(action)
|
|
110
127
|
has_matching_resource = resource == resource_id
|
|
111
|
-
|
|
112
|
-
return # Permission granted
|
|
113
|
-
end
|
|
128
|
+
has_matching_action && has_matching_resource
|
|
114
129
|
end
|
|
115
130
|
end
|
|
116
131
|
|
|
@@ -118,4 +133,13 @@ module Stytch
|
|
|
118
133
|
raise Stytch::PermissionError, authorization_check
|
|
119
134
|
end
|
|
120
135
|
end
|
|
136
|
+
|
|
137
|
+
class CachedOrgPolicy
|
|
138
|
+
def initialize(org_policy:)
|
|
139
|
+
@org_policy = org_policy['org_policy']
|
|
140
|
+
@last_update = Time.now.to_i
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
attr_reader :org_policy, :last_update
|
|
144
|
+
end
|
|
121
145
|
end
|
data/lib/stytch/sessions.rb
CHANGED
|
@@ -234,8 +234,6 @@ module Stytch
|
|
|
234
234
|
# Use this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User.
|
|
235
235
|
# This session can be used with the Stytch SDKs and APIs.
|
|
236
236
|
#
|
|
237
|
-
# The Session returned will be the same Session that was active in your application (the authorizing party) during the initial authorization flow.
|
|
238
|
-
#
|
|
239
237
|
# The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than 5 minutes old. Access Tokens may only be exchanged a single time.
|
|
240
238
|
#
|
|
241
239
|
# == Parameters:
|
data/lib/stytch/version.rb
CHANGED
data/lib/stytch/webauthn.rb
CHANGED
|
@@ -20,9 +20,11 @@ module Stytch
|
|
|
20
20
|
#
|
|
21
21
|
# To optimize for Passkeys, set the `return_passkey_credential_options` field to `true`.
|
|
22
22
|
#
|
|
23
|
-
# After calling this endpoint, the browser will need to call [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public key argument.
|
|
23
|
+
# After calling this endpoint, the browser will need to call [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public key argument.
|
|
24
24
|
#
|
|
25
|
-
#
|
|
25
|
+
# When using built-in browser methods like `navigator.credentials.create()`, set the `use_base64_url_encoding` option to `true`.
|
|
26
|
+
#
|
|
27
|
+
# See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code.
|
|
26
28
|
#
|
|
27
29
|
# == Parameters:
|
|
28
30
|
# user_id::
|
|
@@ -51,7 +53,7 @@ module Stytch
|
|
|
51
53
|
# (no documentation yet)
|
|
52
54
|
# The type of this field is nilable +String+.
|
|
53
55
|
# use_base64_url_encoding::
|
|
54
|
-
#
|
|
56
|
+
# If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`.
|
|
55
57
|
# The type of this field is nilable +Boolean+.
|
|
56
58
|
#
|
|
57
59
|
# == Returns:
|
|
@@ -97,7 +99,7 @@ module Stytch
|
|
|
97
99
|
|
|
98
100
|
# Complete the creation of a WebAuthn registration by passing the response from the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request to this endpoint as the `public_key_credential` parameter.
|
|
99
101
|
#
|
|
100
|
-
#
|
|
102
|
+
# See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code.
|
|
101
103
|
#
|
|
102
104
|
# == Parameters:
|
|
103
105
|
# user_id::
|
|
@@ -191,9 +193,11 @@ module Stytch
|
|
|
191
193
|
#
|
|
192
194
|
# To optimize for Passkeys, set the `return_passkey_credential_options` field to `true`.
|
|
193
195
|
#
|
|
194
|
-
# After calling this endpoint, the browser will need to call [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from `public_key_credential_request_options` passed to the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument.
|
|
196
|
+
# After calling this endpoint, the browser will need to call [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from `public_key_credential_request_options` passed to the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument.
|
|
195
197
|
#
|
|
196
|
-
#
|
|
198
|
+
# When using built-in browser methods like `navigator.credentials.get()`, set the `use_base64_url_encoding` option to `true`.
|
|
199
|
+
#
|
|
200
|
+
# See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code.
|
|
197
201
|
#
|
|
198
202
|
# == Parameters:
|
|
199
203
|
# domain::
|
|
@@ -207,7 +211,7 @@ module Stytch
|
|
|
207
211
|
#
|
|
208
212
|
# The type of this field is nilable +Boolean+.
|
|
209
213
|
# use_base64_url_encoding::
|
|
210
|
-
#
|
|
214
|
+
# If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`.
|
|
211
215
|
# The type of this field is nilable +Boolean+.
|
|
212
216
|
#
|
|
213
217
|
# == Returns:
|
|
@@ -243,7 +247,7 @@ module Stytch
|
|
|
243
247
|
|
|
244
248
|
# Complete the authentication of a Passkey or WebAuthn registration by passing the response from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request to the authenticate endpoint.
|
|
245
249
|
#
|
|
246
|
-
#
|
|
250
|
+
# See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code.
|
|
247
251
|
#
|
|
248
252
|
# == Parameters:
|
|
249
253
|
# public_key_credential::
|
data/stytch.gemspec
CHANGED
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.add_dependency 'json-jwt', '>= 1.13.0'
|
|
30
30
|
spec.add_dependency 'jwt', '>= 2.3.0'
|
|
31
31
|
|
|
32
|
+
spec.add_development_dependency 'prism', '~> 1.8.0'
|
|
32
33
|
spec.add_development_dependency 'rspec', '~> 3.11.0'
|
|
33
34
|
spec.add_development_dependency 'rubocop', '1.64.1'
|
|
34
35
|
spec.add_development_dependency 'rubocop-rspec', '2.24.0'
|
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:
|
|
4
|
+
version: 11.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- stytch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -58,6 +58,20 @@ dependencies:
|
|
|
58
58
|
- - ">="
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
60
|
version: 2.3.0
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: prism
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 1.8.0
|
|
68
|
+
type: :development
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: 1.8.0
|
|
61
75
|
- !ruby/object:Gem::Dependency
|
|
62
76
|
name: rspec
|
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|