stytch 7.2.0 → 7.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7146e140429bd2244d6cb3fc47a94e545487c92f8a4e7b18216d23c59f47ad25
4
- data.tar.gz: 548974370b5bcd86c1c54959f5447829742c2547491ab646cf108d769030f745
3
+ metadata.gz: 8a534c93eef95fb3710c46e843357100e41491a8f6f8c182e86b06b6a307e7da
4
+ data.tar.gz: cfa1764af050bb606eec31e0aaceb19e016a0379593027c78d9e88d62563d863
5
5
  SHA512:
6
- metadata.gz: 8de8b7d887ea706d38a81e15288fe87532c0f37df8021f2e36f547438547625a39aeedaea5d6757d7217da68732a71ad70f654f3e906a11b034d74411e3e5f9c
7
- data.tar.gz: ff1ee0fee78c564b78cadddce1b4fddb3f8e06356e649db35e411db81ac6f7fad00b3177017950a8f0ef1dceff330ae1c91bb0b91838c5e477fc075bbf4183d0
6
+ metadata.gz: 2c920d683660f611cc4a9f359246b9546e2754791548c958e2ff69b1f7437c87b69167de85d04a040226dea956df283a30e9320cc5001a326d319acb524f5edd
7
+ data.tar.gz: 150fb78767e8875201c3f7dbb4dc335e75704f9fa36f80a269b40f2380c8ac2f1d816ca79a5da40cdbbfe48ecc975725c777987cac6b26d84ed3a5db3fcf0e90
@@ -41,7 +41,8 @@ module StytchB2B
41
41
  # == Parameters:
42
42
  # intermediate_session_token::
43
43
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
44
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
44
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
45
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
45
46
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
46
47
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
47
48
  # The type of this field is +String+.
@@ -102,7 +103,8 @@ module StytchB2B
102
103
  # The type of this field is +Boolean+.
103
104
  # intermediate_session_token::
104
105
  # The returned Intermediate Session Token is identical to the one that was originally passed in to the request.
105
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
106
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
107
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
106
108
  # It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a different existing Organization,
107
109
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization.
108
110
  # The type of this field is +String+.
@@ -161,7 +163,8 @@ module StytchB2B
161
163
  # == Parameters:
162
164
  # intermediate_session_token::
163
165
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
164
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
166
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
167
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
165
168
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
166
169
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
167
170
  # The type of this field is +String+.
@@ -292,7 +295,8 @@ module StytchB2B
292
295
  # The type of this field is +Boolean+.
293
296
  # intermediate_session_token::
294
297
  # The returned Intermediate Session Token is identical to the one that was originally passed in to the request.
295
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
298
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
299
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
296
300
  # It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a different existing Organization,
297
301
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization.
298
302
  # The type of this field is +String+.
@@ -368,7 +372,8 @@ module StytchB2B
368
372
  # == Parameters:
369
373
  # intermediate_session_token::
370
374
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
371
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
375
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
376
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
372
377
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
373
378
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
374
379
  # The type of this field is nilable +String+.
@@ -24,7 +24,8 @@ module StytchB2B
24
24
  # Provide the `session_duration_minutes` parameter to set the lifetime of the session. If the `session_duration_minutes` parameter is not specified, a Stytch session will be created with a 60 minute duration.
25
25
  #
26
26
  # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
27
- # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
27
+ # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
28
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA step and acquire a full member session.
28
29
  # The `intermediate_session_token` can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to join a different Organization or create a new one.
29
30
  # The `session_duration_minutes` and `session_custom_claims` parameters will be ignored.
30
31
  #
@@ -111,7 +112,8 @@ module StytchB2B
111
112
  # The type of this field is +Organization+ (+object+).
112
113
  # intermediate_session_token::
113
114
  # The returned Intermediate Session Token contains an Email Magic Link factor associated with the Member's email address.
114
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
115
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
116
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
115
117
  # It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a different existing Organization that allows login with Email Magic Links,
116
118
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization.
117
119
  # The type of this field is +String+.
@@ -424,7 +426,8 @@ module StytchB2B
424
426
  # The type of this field is +String+.
425
427
  # intermediate_session_token::
426
428
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
427
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
429
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
430
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
428
431
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
429
432
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
430
433
  # The type of this field is +String+.
@@ -109,7 +109,8 @@ module StytchB2B
109
109
  # The type of this field is +Boolean+.
110
110
  # intermediate_session_token::
111
111
  # The returned Intermediate Session Token contains an OAuth factor associated with the Member's email address.
112
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
112
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
113
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
113
114
  # It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a different existing Organization that allows login with OAuth,
114
115
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization.
115
116
  # The type of this field is +String+.
@@ -186,7 +187,8 @@ module StytchB2B
186
187
  # The type of this field is +String+.
187
188
  # intermediate_session_token::
188
189
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
189
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
190
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
191
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
190
192
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
191
193
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
192
194
  # The type of this field is +String+.
@@ -502,9 +502,12 @@ module StytchB2B
502
502
 
503
503
  class Members
504
504
  include Stytch::RequestHelper
505
+ attr_reader :oauth_providers
505
506
 
506
507
  def initialize(connection)
507
508
  @connection = connection
509
+
510
+ @oauth_providers = StytchB2B::Organizations::Members::OAuthProviders.new(@connection)
508
511
  end
509
512
 
510
513
  # Updates a Member specified by `organization_id` and `member_id`.
@@ -582,7 +585,13 @@ module StytchB2B
582
585
  # authentication factors with the affected SSO connection IDs will be revoked.
583
586
  # The type of this field is nilable +Boolean+.
584
587
  # default_mfa_method::
585
- # The Member's default MFA method. This value is used to determine which secondary MFA method to use in the case of multiple methods registered for a Member. The current possible values are `sms_otp` and `totp`.
588
+ # Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization's MFA policy is set to `REQUIRED_FOR_ALL`.
589
+ #
590
+ # If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.default-mfa-method` action on the `stytch.member` Resource.
591
+ # Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.settings.default-mfa-method` action on the `stytch.self` Resource.
592
+ # The type of this field is nilable +String+.
593
+ # email_address::
594
+ # Updates the Member's `email_address`, if provided.
586
595
  # The type of this field is nilable +String+.
587
596
  #
588
597
  # == Returns:
@@ -617,6 +626,7 @@ module StytchB2B
617
626
  roles: nil,
618
627
  preserve_existing_sessions: nil,
619
628
  default_mfa_method: nil,
629
+ email_address: nil,
620
630
  method_options: nil
621
631
  )
622
632
  headers = {}
@@ -631,6 +641,7 @@ module StytchB2B
631
641
  request[:roles] = roles unless roles.nil?
632
642
  request[:preserve_existing_sessions] = preserve_existing_sessions unless preserve_existing_sessions.nil?
633
643
  request[:default_mfa_method] = default_mfa_method unless default_mfa_method.nil?
644
+ request[:email_address] = email_address unless email_address.nil?
634
645
 
635
646
  put_request("/v1/b2b/organizations/#{organization_id}/members/#{member_id}", request, headers)
636
647
  end
@@ -1040,6 +1051,114 @@ module StytchB2B
1040
1051
  request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/member", query_params)
1041
1052
  get_request(request, headers)
1042
1053
  end
1054
+
1055
+ class OAuthProviders
1056
+ include Stytch::RequestHelper
1057
+
1058
+ def initialize(connection)
1059
+ @connection = connection
1060
+ end
1061
+
1062
+ # Retrieve the saved Google access token and ID token for a member. After a successful OAuth login, Stytch will save the
1063
+ # issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the
1064
+ # access token automatically.
1065
+ #
1066
+ # __Note:__ Google does not issue a refresh token on every login, and refresh tokens may expire if unused.
1067
+ # To force a refresh token to be issued, pass the `?provider_prompt=consent` query param into the
1068
+ # [Start Google OAuth flow](https://stytch.com/docs/b2b/api/oauth-google-start) endpoint.
1069
+ #
1070
+ # == Parameters:
1071
+ # organization_id::
1072
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
1073
+ # The type of this field is +String+.
1074
+ # member_id::
1075
+ # Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
1076
+ # The type of this field is +String+.
1077
+ #
1078
+ # == Returns:
1079
+ # An object with the following fields:
1080
+ # request_id::
1081
+ # 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.
1082
+ # The type of this field is +String+.
1083
+ # provider_type::
1084
+ # Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
1085
+ # The type of this field is +String+.
1086
+ # provider_subject::
1087
+ # The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols.
1088
+ # The type of this field is +String+.
1089
+ # access_token::
1090
+ # The `access_token` that you may use to access the User's data in the provider's API.
1091
+ # The type of this field is +String+.
1092
+ # access_token_expires_in::
1093
+ # The number of seconds until the access token expires.
1094
+ # The type of this field is +Integer+.
1095
+ # id_token::
1096
+ # The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth.
1097
+ # The type of this field is +String+.
1098
+ # scopes::
1099
+ # The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes.
1100
+ # The type of this field is list of +String+.
1101
+ # status_code::
1102
+ # 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.
1103
+ # The type of this field is +Integer+.
1104
+ def google(
1105
+ organization_id:,
1106
+ member_id:
1107
+ )
1108
+ headers = {}
1109
+ query_params = {}
1110
+ request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/google", query_params)
1111
+ get_request(request, headers)
1112
+ end
1113
+
1114
+ # Retrieve the saved Microsoft access token and ID token for a member. After a successful OAuth login, Stytch will save the
1115
+ # issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the
1116
+ # access token automatically.
1117
+ #
1118
+ # == Parameters:
1119
+ # organization_id::
1120
+ # Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
1121
+ # The type of this field is +String+.
1122
+ # member_id::
1123
+ # Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value.
1124
+ # The type of this field is +String+.
1125
+ #
1126
+ # == Returns:
1127
+ # An object with the following fields:
1128
+ # request_id::
1129
+ # 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.
1130
+ # The type of this field is +String+.
1131
+ # provider_type::
1132
+ # Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc.
1133
+ # The type of this field is +String+.
1134
+ # provider_subject::
1135
+ # The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols.
1136
+ # The type of this field is +String+.
1137
+ # access_token::
1138
+ # The `access_token` that you may use to access the User's data in the provider's API.
1139
+ # The type of this field is +String+.
1140
+ # access_token_expires_in::
1141
+ # The number of seconds until the access token expires.
1142
+ # The type of this field is +Integer+.
1143
+ # id_token::
1144
+ # The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth.
1145
+ # The type of this field is +String+.
1146
+ # scopes::
1147
+ # The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes.
1148
+ # The type of this field is list of +String+.
1149
+ # status_code::
1150
+ # 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.
1151
+ # The type of this field is +Integer+.
1152
+ def microsoft(
1153
+ organization_id:,
1154
+ member_id:
1155
+ )
1156
+ headers = {}
1157
+ query_params = {}
1158
+ request = request_with_query_params("/v1/b2b/organizations/#{organization_id}/members/#{member_id}/oauth_providers/microsoft", query_params)
1159
+ get_request(request, headers)
1160
+ end
1161
+ end
1043
1162
  end
1044
1163
  end
1045
1164
  end
@@ -66,7 +66,8 @@ module StytchB2B
66
66
  # The type of this field is nilable +SendRequestLocale+ (string enum).
67
67
  # intermediate_session_token::
68
68
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
69
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
69
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
70
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
70
71
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
71
72
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
72
73
  # The type of this field is nilable +String+.
@@ -146,7 +147,8 @@ module StytchB2B
146
147
  # The type of this field is +String+.
147
148
  # intermediate_session_token::
148
149
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
149
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
150
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
151
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
150
152
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
151
153
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
152
154
  # The type of this field is nilable +String+.
@@ -281,7 +281,8 @@ module StytchB2B
281
281
  # The type of this field is +Organization+ (+object+).
282
282
  # intermediate_session_token::
283
283
  # The returned Intermediate Session Token contains a password factor associated with the Member.
284
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
284
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
285
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
285
286
  # Password factors are not transferable between Organizations, so the intermediate session token is not valid for use with discovery endpoints.
286
287
  # The type of this field is +String+.
287
288
  # member_authenticated::
@@ -501,7 +502,8 @@ module StytchB2B
501
502
  # The type of this field is +Organization+ (+object+).
502
503
  # intermediate_session_token::
503
504
  # The returned Intermediate Session Token contains a password factor associated with the Member.
504
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
505
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
506
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
505
507
  # Password factors are not transferable between Organizations, so the intermediate session token is not valid for use with discovery endpoints.
506
508
  # The type of this field is +String+.
507
509
  # member_authenticated::
@@ -613,7 +615,8 @@ module StytchB2B
613
615
  # The type of this field is +String+.
614
616
  # intermediate_session_token::
615
617
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
616
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
618
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
619
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
617
620
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
618
621
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
619
622
  # The type of this field is +String+.
@@ -744,7 +747,8 @@ module StytchB2B
744
747
  # The type of this field is +Organization+ (+object+).
745
748
  # intermediate_session_token::
746
749
  # The returned Intermediate Session Token contains a password factor associated with the Member.
747
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
750
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
751
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
748
752
  # Password factors are not transferable between Organizations, so the intermediate session token is not valid for use with discovery endpoints.
749
753
  # The type of this field is +String+.
750
754
  # member_authenticated::
@@ -30,7 +30,8 @@ module StytchB2B
30
30
  # The type of this field is +String+.
31
31
  # intermediate_session_token::
32
32
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
33
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
33
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
34
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
34
35
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
35
36
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
36
37
  # The type of this field is nilable +String+.
@@ -284,7 +284,8 @@ module StytchB2B
284
284
  # The type of this field is +Boolean+.
285
285
  # intermediate_session_token::
286
286
  # The returned Intermediate Session Token contains any Email Magic Link or OAuth factors from the original member session that are valid for the target Organization.
287
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the target Organization.
287
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
288
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the target Organization.
288
289
  # It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a different existing Organization,
289
290
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization.
290
291
  # The type of this field is +String+.
@@ -134,7 +134,8 @@ module StytchB2B
134
134
  # To link this authentication event to an existing Stytch session, include either the `session_token` or `session_jwt` param.
135
135
  #
136
136
  # If the Member is required to complete MFA to log in to the Organization, the returned value of `member_authenticated` will be `false`, and an `intermediate_session_token` will be returned.
137
- # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA step and acquire a full member session.
137
+ # The `intermediate_session_token` can be passed into the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
138
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA step and acquire a full member session.
138
139
  # The `session_duration_minutes` and `session_custom_claims` parameters will be ignored.
139
140
  #
140
141
  # If a valid `session_token` or `session_jwt` is passed in, the Member will not be required to complete an MFA step.
@@ -210,7 +211,8 @@ module StytchB2B
210
211
  # The type of this field is +Organization+ (+object+).
211
212
  # intermediate_session_token::
212
213
  # The returned Intermediate Session Token contains an SSO factor associated with the Member.
213
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete the MFA flow and log in to the Organization.
214
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
215
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete the MFA flow and log in to the Organization.
214
216
  # SSO factors are not transferable between Organizations, so the intermediate session token is not valid for use with discovery endpoints.
215
217
  # The type of this field is +String+.
216
218
  # member_authenticated::
@@ -32,7 +32,8 @@ module StytchB2B
32
32
  # The type of this field is nilable +Integer+.
33
33
  # intermediate_session_token::
34
34
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
35
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
35
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
36
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
36
37
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
37
38
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
38
39
  # The type of this field is nilable +String+.
@@ -107,7 +108,8 @@ module StytchB2B
107
108
  # The type of this field is +String+.
108
109
  # intermediate_session_token::
109
110
  # The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session.
110
- # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms) to complete an MFA flow;
111
+ # The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp),
112
+ # or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow;
111
113
  # the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token;
112
114
  # or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member.
113
115
  # The type of this field is nilable +String+.
data/lib/stytch/otps.rb CHANGED
@@ -455,7 +455,7 @@ module Stytch
455
455
  # This endpoint also allows you to add a new email address to an existing Stytch User. Including a `user_id`, `session_token`, or `session_jwt` in your Send one-time passcode by email request will add the new, unverified email address to the existing Stytch User. If the user successfully authenticates within 5 minutes, the new email address will be marked as verified and remain permanently on the existing Stytch User. Otherwise, it will be removed from the User object, and any subsequent login requests using that email address will create a new User.
456
456
  #
457
457
  # ### Next steps
458
- # Collect the OTP which was delivered to the user. Call [Authenticate OTP](https://stytch.com/docs/api/authenticate-otp) using the OTP `code` along with the `phone_id` found in the response as the `method_id`.
458
+ # Collect the OTP which was delivered to the user. Call [Authenticate OTP](https://stytch.com/docs/api/authenticate-otp) using the OTP `code` along with the `email_id` found in the response as the `method_id`.
459
459
  #
460
460
  # == Parameters:
461
461
  # email::
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '7.2.0'
4
+ VERSION = '7.4.0'
5
5
  end
@@ -291,7 +291,7 @@ module Stytch
291
291
  #
292
292
  # == Parameters:
293
293
  # webauthn_registration_id::
294
- # Globally unique UUID that identifies a Passkey or WebAuthn registration in the Stytch API. The `webautn_registration_id` is used when you need to operate on a specific User's WebAuthn registartion.
294
+ # Globally unique UUID that identifies a Passkey or WebAuthn registration in the Stytch API. The `webauthn_registration_id` is used when you need to operate on a specific User's WebAuthn registration.
295
295
  # The type of this field is +String+.
296
296
  # name::
297
297
  # The `name` of the WebAuthn registration or Passkey.
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: 7.2.0
4
+ version: 7.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-01 00:00:00.000000000 Z
11
+ date: 2024-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday