Skip to content

Commit c1a9ba4

Browse files
feat: managed-auth: surface awaiting_external_action even when fallback actions exist
1 parent b2c8f95 commit c1a9ba4

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 112
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-7d2d29d7598105d50e5118e0bc5ac654361a92cb95555705dbd1d236848e1456.yml
3-
openapi_spec_hash: 10002eae793e08f81932239bbc72b503
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-38c6ce8b0ce54e6c62517b9635acaf65369c26cdb1b55eb66290c13a8ab2b33d.yml
3+
openapi_spec_hash: e6f6ed157b1e318d1a1db72fd1d27091
44
config_hash: 08d55086449943a8fec212b870061a3f

authconnection.go

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ type ManagedAuth struct {
261261
// - { provider, path } for external provider item
262262
// - { provider, auto: true } for external provider domain lookup
263263
Credential ManagedAuthCredential `json:"credential"`
264-
// Fields awaiting input (present when flow_step=awaiting_input)
264+
// Fields awaiting input (present when flow_step=awaiting_input; may also be
265+
// present with awaiting_external_action as fallback actions)
265266
DiscoveredFields []ManagedAuthDiscoveredField `json:"discovered_fields" api:"nullable"`
266267
// Machine-readable error code (present when flow_status=failed)
267268
ErrorCode string `json:"error_code" api:"nullable"`
@@ -312,17 +313,19 @@ type ManagedAuth struct {
312313
LiveViewURL string `json:"live_view_url" api:"nullable" format:"uri"`
313314
// Optional login page URL to skip discovery
314315
LoginURL string `json:"login_url" format:"uri"`
315-
// MFA method options (present when flow_step=awaiting_input and MFA selection
316-
// required)
316+
// MFA method options (present when flow_step=awaiting_input; may also be present
317+
// with awaiting_external_action as fallback actions)
317318
MfaOptions []ManagedAuthMfaOption `json:"mfa_options" api:"nullable"`
318-
// SSO buttons available (present when flow_step=awaiting_input)
319+
// SSO buttons available (present when flow_step=awaiting_input; may also be
320+
// present with awaiting_external_action as fallback actions)
319321
PendingSSOButtons []ManagedAuthPendingSSOButton `json:"pending_sso_buttons" api:"nullable"`
320322
// URL where the browser landed after successful login
321323
PostLoginURL string `json:"post_login_url" format:"uri"`
322324
// ID of the proxy associated with this connection, if any.
323325
ProxyID string `json:"proxy_id"`
324326
// Non-MFA choices presented during the auth flow, such as account selection or org
325-
// pickers (present when flow_step=awaiting_input).
327+
// pickers (present when flow_step=awaiting_input; may also be present with
328+
// awaiting_external_action as fallback actions).
326329
SignInOptions []ManagedAuthSignInOption `json:"sign_in_options" api:"nullable"`
327330
// SSO provider being used (e.g., google, github, microsoft)
328331
SSOProvider string `json:"sso_provider" api:"nullable"`
@@ -917,7 +920,8 @@ type AuthConnectionFollowResponseManagedAuthState struct {
917920
FlowStep string `json:"flow_step" api:"required"`
918921
// Time the state was reported.
919922
Timestamp time.Time `json:"timestamp" api:"required" format:"date-time"`
920-
// Fields awaiting input (present when flow_step=AWAITING_INPUT).
923+
// Fields awaiting input (present when flow_step=AWAITING_INPUT; may also be
924+
// present with AWAITING_EXTERNAL_ACTION as fallback actions).
921925
DiscoveredFields []AuthConnectionFollowResponseManagedAuthStateDiscoveredField `json:"discovered_fields"`
922926
// Machine-readable error code (present when flow_status=FAILED).
923927
ErrorCode string `json:"error_code"`
@@ -934,15 +938,17 @@ type AuthConnectionFollowResponseManagedAuthState struct {
934938
HostedURL string `json:"hosted_url" format:"uri"`
935939
// Browser live view URL for debugging.
936940
LiveViewURL string `json:"live_view_url" format:"uri"`
937-
// MFA method options (present when flow_step=AWAITING_INPUT and MFA selection
938-
// required).
941+
// MFA method options (present when flow_step=AWAITING_INPUT; may also be present
942+
// with AWAITING_EXTERNAL_ACTION as fallback actions).
939943
MfaOptions []AuthConnectionFollowResponseManagedAuthStateMfaOption `json:"mfa_options"`
940-
// SSO buttons available (present when flow_step=AWAITING_INPUT).
944+
// SSO buttons available (present when flow_step=AWAITING_INPUT; may also be
945+
// present with AWAITING_EXTERNAL_ACTION as fallback actions).
941946
PendingSSOButtons []AuthConnectionFollowResponseManagedAuthStatePendingSSOButton `json:"pending_sso_buttons"`
942947
// URL where the browser landed after successful login.
943948
PostLoginURL string `json:"post_login_url" format:"uri"`
944949
// Non-MFA choices presented during the auth flow, such as account selection or org
945-
// pickers (present when flow_step=AWAITING_INPUT).
950+
// pickers (present when flow_step=AWAITING_INPUT; may also be present with
951+
// AWAITING_EXTERNAL_ACTION as fallback actions).
946952
SignInOptions []AuthConnectionFollowResponseManagedAuthStateSignInOption `json:"sign_in_options"`
947953
// Visible error message from the website (e.g., 'Incorrect password'). Present
948954
// when the website displays an error during login.

0 commit comments

Comments
 (0)