authhero 9.41.0 → 9.42.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.
Files changed (74) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +114 -111
  3. package/dist/authhero.d.ts +534 -272
  4. package/dist/authhero.mjs +16181 -12453
  5. package/dist/{mfa-Dx8-AJ6U.js → mfa-C8qBEQeH.js} +2 -2
  6. package/dist/{mfa-CdC-9ysu.mjs → mfa-CVF4Wbdz.mjs} +115 -115
  7. package/dist/mfa-attempts-CzGjIGzD.js +395 -0
  8. package/dist/{mfa-attempts-mBkfX0wf.mjs → mfa-attempts-sV0Xs59R.mjs} +5151 -4696
  9. package/dist/{passkey-enrollment-KQcVF_QM.js → passkey-enrollment-CAb2zWEF.js} +1 -1
  10. package/dist/tsconfig.types.tsbuildinfo +1 -1
  11. package/dist/types/authentication-flows/passwordless.d.ts +2 -2
  12. package/dist/types/helpers/client.d.ts +26 -0
  13. package/dist/types/helpers/login-migration.d.ts +56 -0
  14. package/dist/types/helpers/login-version.d.ts +18 -0
  15. package/dist/types/helpers/management-audience.d.ts +11 -0
  16. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  17. package/dist/types/helpers/saml-connection-options.d.ts +24 -0
  18. package/dist/types/helpers/saml-request-signature.d.ts +36 -0
  19. package/dist/types/hooks/lifecycle-codehooks.d.ts +1 -1
  20. package/dist/types/index.d.ts +490 -271
  21. package/dist/types/routes/auth-api/authorize.d.ts +13 -13
  22. package/dist/types/routes/auth-api/callback.d.ts +42 -6
  23. package/dist/types/routes/auth-api/device.d.ts +21 -21
  24. package/dist/types/routes/auth-api/index.d.ts +113 -77
  25. package/dist/types/routes/auth-api/logout.d.ts +2 -2
  26. package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
  27. package/dist/types/routes/auth-api/passwordless.d.ts +14 -14
  28. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  29. package/dist/types/routes/auth-api/token.d.ts +12 -12
  30. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  31. package/dist/types/routes/management-api/action-triggers.d.ts +2 -2
  32. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  33. package/dist/types/routes/management-api/branding-uploads.d.ts +4 -4
  34. package/dist/types/routes/management-api/branding.d.ts +19 -19
  35. package/dist/types/routes/management-api/client-registration-tokens.d.ts +3 -3
  36. package/dist/types/routes/management-api/clients.d.ts +38 -8
  37. package/dist/types/routes/management-api/connections.d.ts +90 -0
  38. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  39. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  40. package/dist/types/routes/management-api/failed-events.d.ts +4 -4
  41. package/dist/types/routes/management-api/forms.d.ts +8 -8
  42. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  43. package/dist/types/routes/management-api/hooks.d.ts +21 -21
  44. package/dist/types/routes/management-api/index.d.ts +287 -167
  45. package/dist/types/routes/management-api/keys.d.ts +12 -12
  46. package/dist/types/routes/management-api/log-streams.d.ts +12 -12
  47. package/dist/types/routes/management-api/logs.d.ts +4 -4
  48. package/dist/types/routes/management-api/organizations.d.ts +6 -6
  49. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  50. package/dist/types/routes/management-api/self-service-profiles.d.ts +8 -8
  51. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  52. package/dist/types/routes/management-api/tenant-operations.d.ts +5 -5
  53. package/dist/types/routes/management-api/tenants.d.ts +27 -23
  54. package/dist/types/routes/management-api/themes.d.ts +9 -9
  55. package/dist/types/routes/management-api/users.d.ts +26 -26
  56. package/dist/types/routes/saml/index.d.ts +72 -9
  57. package/dist/types/routes/saml/samlp.d.ts +72 -9
  58. package/dist/types/routes/universal-login/common.d.ts +12 -10
  59. package/dist/types/routes/universal-login/continue.d.ts +4 -4
  60. package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
  61. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  62. package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
  63. package/dist/types/routes/universal-login/index.d.ts +8 -8
  64. package/dist/types/routes/universal-login/u2-index.d.ts +9 -9
  65. package/dist/types/routes/universal-login/u2-routes.d.ts +7 -7
  66. package/dist/types/state-machines/login-session.d.ts +1 -1
  67. package/dist/types/strategies/index.d.ts +2 -0
  68. package/dist/types/strategies/samlp.d.ts +58 -0
  69. package/dist/types/types/AuthHeroConfig.d.ts +15 -1
  70. package/dist/types/types/Bindings.d.ts +2 -1
  71. package/dist/types/utils/ssrf-fetch.d.ts +2 -0
  72. package/dist/types/variables.d.ts +7 -6
  73. package/package.json +9 -6
  74. package/dist/mfa-attempts-CtWWceg2.js +0 -393
@@ -4,6 +4,37 @@ export declare const samlpRoutes: OpenAPIHono<{
4
4
  Bindings: Bindings;
5
5
  Variables: Variables;
6
6
  }, {
7
+ "/metadata": {
8
+ $get: {
9
+ input: {
10
+ query: {
11
+ connection: string;
12
+ };
13
+ };
14
+ output: Response;
15
+ outputFormat: "json";
16
+ status: import("hono/utils/http-status").StatusCode;
17
+ } | {
18
+ input: {
19
+ query: {
20
+ connection: string;
21
+ };
22
+ };
23
+ output: {};
24
+ outputFormat: string;
25
+ status: 400;
26
+ } | {
27
+ input: {
28
+ query: {
29
+ connection: string;
30
+ };
31
+ };
32
+ output: {};
33
+ outputFormat: string;
34
+ status: 404;
35
+ };
36
+ };
37
+ } & {
7
38
  "/metadata/:client_id": {
8
39
  $get: {
9
40
  input: {
@@ -40,9 +71,9 @@ export declare const samlpRoutes: OpenAPIHono<{
40
71
  Signature?: string | undefined;
41
72
  };
42
73
  };
43
- output: Response;
44
- outputFormat: "json";
45
- status: import("hono/utils/http-status").StatusCode;
74
+ output: {};
75
+ outputFormat: string;
76
+ status: 400;
46
77
  } | {
47
78
  input: {
48
79
  param: {
@@ -58,7 +89,39 @@ export declare const samlpRoutes: OpenAPIHono<{
58
89
  };
59
90
  output: {};
60
91
  outputFormat: string;
92
+ status: 302;
93
+ };
94
+ };
95
+ } & {
96
+ "/:client_id": {
97
+ $post: {
98
+ input: {
99
+ param: {
100
+ client_id: string;
101
+ };
102
+ } & {
103
+ form: {
104
+ SAMLRequest: string;
105
+ RelayState?: string | undefined;
106
+ };
107
+ };
108
+ output: {};
109
+ outputFormat: string;
61
110
  status: 400;
111
+ } | {
112
+ input: {
113
+ param: {
114
+ client_id: string;
115
+ };
116
+ } & {
117
+ form: {
118
+ SAMLRequest: string;
119
+ RelayState?: string | undefined;
120
+ };
121
+ };
122
+ output: {};
123
+ outputFormat: string;
124
+ status: 302;
62
125
  };
63
126
  };
64
127
  } & {
@@ -78,7 +141,7 @@ export declare const samlpRoutes: OpenAPIHono<{
78
141
  };
79
142
  output: {};
80
143
  outputFormat: string;
81
- status: 200;
144
+ status: 400;
82
145
  } | {
83
146
  input: {
84
147
  param: {
@@ -94,7 +157,7 @@ export declare const samlpRoutes: OpenAPIHono<{
94
157
  };
95
158
  output: {};
96
159
  outputFormat: string;
97
- status: 302;
160
+ status: 200;
98
161
  } | {
99
162
  input: {
100
163
  param: {
@@ -110,7 +173,7 @@ export declare const samlpRoutes: OpenAPIHono<{
110
173
  };
111
174
  output: {};
112
175
  outputFormat: string;
113
- status: 400;
176
+ status: 302;
114
177
  };
115
178
  };
116
179
  } & {
@@ -128,7 +191,7 @@ export declare const samlpRoutes: OpenAPIHono<{
128
191
  };
129
192
  output: {};
130
193
  outputFormat: string;
131
- status: 200;
194
+ status: 400;
132
195
  } | {
133
196
  input: {
134
197
  param: {
@@ -142,7 +205,7 @@ export declare const samlpRoutes: OpenAPIHono<{
142
205
  };
143
206
  output: {};
144
207
  outputFormat: string;
145
- status: 302;
208
+ status: 200;
146
209
  } | {
147
210
  input: {
148
211
  param: {
@@ -156,7 +219,7 @@ export declare const samlpRoutes: OpenAPIHono<{
156
219
  };
157
220
  output: {};
158
221
  outputFormat: string;
159
- status: 400;
222
+ status: 302;
160
223
  };
161
224
  };
162
225
  }, "/">;
@@ -71,15 +71,15 @@ export declare function initJSXRoute(ctx: Context<{
71
71
  page_background: {
72
72
  background_color: string;
73
73
  background_image_url: string;
74
- page_layout: "left" | "right" | "center";
74
+ page_layout: "center" | "left" | "right";
75
75
  background_color_dark?: string | undefined;
76
76
  background_image_url_dark?: string | undefined;
77
77
  logo_placement?: "none" | "widget" | "chip" | undefined;
78
78
  };
79
79
  widget: {
80
- header_text_alignment: "left" | "right" | "center";
80
+ header_text_alignment: "center" | "left" | "right";
81
81
  logo_height: number;
82
- logo_position: "none" | "left" | "right" | "center";
82
+ logo_position: "none" | "center" | "left" | "right";
83
83
  logo_url: string;
84
84
  social_buttons_layout: "bottom" | "top";
85
85
  logo_url_dark?: string | undefined;
@@ -202,6 +202,7 @@ export declare function initJSXRoute(ctx: Context<{
202
202
  use_scope_descriptions_for_consent?: boolean | undefined;
203
203
  inherit_global_permissions_in_organizations?: boolean | undefined;
204
204
  restrict_undefined_scopes?: boolean | undefined;
205
+ universal_login_version?: "1" | "2" | undefined;
205
206
  } | undefined;
206
207
  sandbox_version?: string | undefined;
207
208
  legacy_sandbox_version?: string | undefined;
@@ -243,7 +244,7 @@ export declare function initJSXRoute(ctx: Context<{
243
244
  pushed_authorization_requests_supported?: boolean | undefined;
244
245
  authorization_response_iss_parameter_supported?: boolean | undefined;
245
246
  deployment_type?: "shared" | "wfp" | undefined;
246
- provisioning_state?: "pending" | "failed" | "ready" | undefined;
247
+ provisioning_state?: "pending" | "ready" | "failed" | undefined;
247
248
  provisioning_error?: string | undefined;
248
249
  provisioning_state_changed_at?: string | undefined;
249
250
  bundle_configuration?: string | undefined;
@@ -315,7 +316,7 @@ export declare function initJSXRoute(ctx: Context<{
315
316
  } | undefined;
316
317
  allow_remember_browser?: boolean | undefined;
317
318
  remember_browser_lifetime_in_days?: number | undefined;
318
- policy?: "always" | "never" | "all-applications" | "confidence-score" | undefined;
319
+ policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
319
320
  } | undefined;
320
321
  is_control_plane?: boolean | undefined;
321
322
  has_children?: boolean | undefined;
@@ -456,15 +457,15 @@ export declare function initJSXRouteWithSession(ctx: Context<{
456
457
  page_background: {
457
458
  background_color: string;
458
459
  background_image_url: string;
459
- page_layout: "left" | "right" | "center";
460
+ page_layout: "center" | "left" | "right";
460
461
  background_color_dark?: string | undefined;
461
462
  background_image_url_dark?: string | undefined;
462
463
  logo_placement?: "none" | "widget" | "chip" | undefined;
463
464
  };
464
465
  widget: {
465
- header_text_alignment: "left" | "right" | "center";
466
+ header_text_alignment: "center" | "left" | "right";
466
467
  logo_height: number;
467
- logo_position: "none" | "left" | "right" | "center";
468
+ logo_position: "none" | "center" | "left" | "right";
468
469
  logo_url: string;
469
470
  social_buttons_layout: "bottom" | "top";
470
471
  logo_url_dark?: string | undefined;
@@ -656,6 +657,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
656
657
  use_scope_descriptions_for_consent?: boolean | undefined;
657
658
  inherit_global_permissions_in_organizations?: boolean | undefined;
658
659
  restrict_undefined_scopes?: boolean | undefined;
660
+ universal_login_version?: "1" | "2" | undefined;
659
661
  } | undefined;
660
662
  sandbox_version?: string | undefined;
661
663
  legacy_sandbox_version?: string | undefined;
@@ -697,7 +699,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
697
699
  pushed_authorization_requests_supported?: boolean | undefined;
698
700
  authorization_response_iss_parameter_supported?: boolean | undefined;
699
701
  deployment_type?: "shared" | "wfp" | undefined;
700
- provisioning_state?: "pending" | "failed" | "ready" | undefined;
702
+ provisioning_state?: "pending" | "ready" | "failed" | undefined;
701
703
  provisioning_error?: string | undefined;
702
704
  provisioning_state_changed_at?: string | undefined;
703
705
  bundle_configuration?: string | undefined;
@@ -769,7 +771,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
769
771
  } | undefined;
770
772
  allow_remember_browser?: boolean | undefined;
771
773
  remember_browser_lifetime_in_days?: number | undefined;
772
- policy?: "always" | "never" | "all-applications" | "confidence-score" | undefined;
774
+ policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
773
775
  } | undefined;
774
776
  is_control_plane?: boolean | undefined;
775
777
  has_children?: boolean | undefined;
@@ -13,7 +13,7 @@ export declare const continueRoutes: OpenAPIHono<{
13
13
  };
14
14
  output: {};
15
15
  outputFormat: string;
16
- status: 302;
16
+ status: 400;
17
17
  } | {
18
18
  input: {
19
19
  query: {
@@ -22,7 +22,7 @@ export declare const continueRoutes: OpenAPIHono<{
22
22
  };
23
23
  output: {};
24
24
  outputFormat: string;
25
- status: 400;
25
+ status: 302;
26
26
  } | {
27
27
  input: {
28
28
  query: {
@@ -48,7 +48,7 @@ export declare const u2ContinueRoutes: OpenAPIHono<{
48
48
  };
49
49
  output: {};
50
50
  outputFormat: string;
51
- status: 302;
51
+ status: 400;
52
52
  } | {
53
53
  input: {
54
54
  query: {
@@ -57,7 +57,7 @@ export declare const u2ContinueRoutes: OpenAPIHono<{
57
57
  };
58
58
  output: {};
59
59
  outputFormat: string;
60
- status: 400;
60
+ status: 302;
61
61
  } | {
62
62
  input: {
63
63
  query: {
@@ -27,7 +27,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
27
27
  output: {
28
28
  screen: {
29
29
  action: string;
30
- method: "POST" | "GET";
30
+ method: "GET" | "POST";
31
31
  components: {
32
32
  id: string;
33
33
  type: string;
@@ -107,7 +107,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
107
107
  output: {
108
108
  screen: {
109
109
  action: string;
110
- method: "POST" | "GET";
110
+ method: "GET" | "POST";
111
111
  components: {
112
112
  id: string;
113
113
  type: string;
@@ -204,7 +204,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
204
204
  output: {
205
205
  screen: {
206
206
  action: string;
207
- method: "POST" | "GET";
207
+ method: "GET" | "POST";
208
208
  components: {
209
209
  id: string;
210
210
  type: string;
@@ -319,7 +319,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
319
319
  output: {
320
320
  screen: {
321
321
  action: string;
322
- method: "POST" | "GET";
322
+ method: "GET" | "POST";
323
323
  components: {
324
324
  id: string;
325
325
  type: string;
@@ -35,7 +35,7 @@ export declare const identifierRoutes: OpenAPIHono<{
35
35
  };
36
36
  output: {};
37
37
  outputFormat: string;
38
- status: 302;
38
+ status: 400;
39
39
  } | {
40
40
  input: {
41
41
  query: {
@@ -49,7 +49,7 @@ export declare const identifierRoutes: OpenAPIHono<{
49
49
  };
50
50
  output: {};
51
51
  outputFormat: string;
52
- status: 400;
52
+ status: 302;
53
53
  };
54
54
  };
55
55
  }, "/">;
@@ -13,7 +13,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
13
13
  };
14
14
  output: {};
15
15
  outputFormat: string;
16
- status: 200;
16
+ status: 400;
17
17
  } | {
18
18
  input: {
19
19
  query: {
@@ -22,7 +22,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
22
22
  };
23
23
  output: {};
24
24
  outputFormat: string;
25
- status: 400;
25
+ status: 200;
26
26
  };
27
27
  };
28
28
  } & {
@@ -52,7 +52,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
52
52
  };
53
53
  output: {};
54
54
  outputFormat: string;
55
- status: 302;
55
+ status: 400;
56
56
  } | {
57
57
  input: {
58
58
  query: {
@@ -65,7 +65,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
65
65
  };
66
66
  output: {};
67
67
  outputFormat: string;
68
- status: 400;
68
+ status: 302;
69
69
  };
70
70
  };
71
71
  }, "/">;
@@ -27,7 +27,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
27
27
  };
28
28
  output: {};
29
29
  outputFormat: string;
30
- status: 302;
30
+ status: 400;
31
31
  } | {
32
32
  input: {
33
33
  query: {
@@ -36,7 +36,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
36
36
  };
37
37
  output: {};
38
38
  outputFormat: string;
39
- status: 400;
39
+ status: 302;
40
40
  } | {
41
41
  input: {
42
42
  query: {
@@ -126,7 +126,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
126
126
  };
127
127
  output: {};
128
128
  outputFormat: string;
129
- status: 200;
129
+ status: 400;
130
130
  } | {
131
131
  input: {
132
132
  query: {
@@ -135,7 +135,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
135
135
  };
136
136
  output: {};
137
137
  outputFormat: string;
138
- status: 400;
138
+ status: 200;
139
139
  };
140
140
  };
141
141
  } & {
@@ -165,7 +165,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
165
165
  };
166
166
  output: {};
167
167
  outputFormat: string;
168
- status: 302;
168
+ status: 400;
169
169
  } | {
170
170
  input: {
171
171
  query: {
@@ -178,7 +178,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
178
178
  };
179
179
  output: {};
180
180
  outputFormat: string;
181
- status: 400;
181
+ status: 302;
182
182
  };
183
183
  };
184
184
  }, "/impersonate"> & import("hono/types").MergeSchemaPath<{
@@ -520,7 +520,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
520
520
  };
521
521
  output: {};
522
522
  outputFormat: string;
523
- status: 302;
523
+ status: 400;
524
524
  } | {
525
525
  input: {
526
526
  query: {
@@ -534,7 +534,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
534
534
  };
535
535
  output: {};
536
536
  outputFormat: string;
537
- status: 400;
537
+ status: 302;
538
538
  };
539
539
  };
540
540
  }, "/login/identifier"> & import("hono/types").MergeSchemaPath<{
@@ -195,7 +195,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
195
195
  $get: {
196
196
  input: {
197
197
  param: {
198
- screen: "impersonate" | "login" | "signup" | "reset-password" | "account" | "invalid-session" | "consent" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
198
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "account" | "enter-password" | "try-connection-result" | "invalid-session" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
199
199
  };
200
200
  } & {
201
201
  query: {
@@ -211,7 +211,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
211
211
  } | {
212
212
  input: {
213
213
  param: {
214
- screen: "impersonate" | "login" | "signup" | "reset-password" | "account" | "invalid-session" | "consent" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
214
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "account" | "enter-password" | "try-connection-result" | "invalid-session" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
215
215
  };
216
216
  } & {
217
217
  query: {
@@ -223,11 +223,11 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
223
223
  };
224
224
  output: {};
225
225
  outputFormat: string;
226
- status: 302;
226
+ status: 400;
227
227
  } | {
228
228
  input: {
229
229
  param: {
230
- screen: "impersonate" | "login" | "signup" | "reset-password" | "account" | "invalid-session" | "consent" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
230
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "account" | "enter-password" | "try-connection-result" | "invalid-session" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
231
231
  };
232
232
  } & {
233
233
  query: {
@@ -239,7 +239,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
239
239
  };
240
240
  output: {};
241
241
  outputFormat: string;
242
- status: 400;
242
+ status: 302;
243
243
  };
244
244
  };
245
245
  } & {
@@ -247,7 +247,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
247
247
  $post: {
248
248
  input: {
249
249
  param: {
250
- screen: "impersonate" | "login" | "signup" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
250
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
251
251
  };
252
252
  } & {
253
253
  query: {
@@ -265,7 +265,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
265
265
  } | {
266
266
  input: {
267
267
  param: {
268
- screen: "impersonate" | "login" | "signup" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
268
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
269
269
  };
270
270
  } & {
271
271
  query: {
@@ -306,7 +306,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
306
306
  };
307
307
  output: {};
308
308
  outputFormat: string;
309
- status: 302;
309
+ status: 400;
310
310
  } | {
311
311
  input: {
312
312
  query: {
@@ -315,7 +315,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
315
315
  };
316
316
  output: {};
317
317
  outputFormat: string;
318
- status: 400;
318
+ status: 302;
319
319
  } | {
320
320
  input: {
321
321
  query: {
@@ -201,7 +201,7 @@ export declare const u2Routes: OpenAPIHono<{
201
201
  $get: {
202
202
  input: {
203
203
  param: {
204
- screen: "impersonate" | "login" | "signup" | "reset-password" | "account" | "invalid-session" | "consent" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
204
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "account" | "enter-password" | "try-connection-result" | "invalid-session" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
205
205
  };
206
206
  } & {
207
207
  query: {
@@ -217,7 +217,7 @@ export declare const u2Routes: OpenAPIHono<{
217
217
  } | {
218
218
  input: {
219
219
  param: {
220
- screen: "impersonate" | "login" | "signup" | "reset-password" | "account" | "invalid-session" | "consent" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
220
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "account" | "enter-password" | "try-connection-result" | "invalid-session" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
221
221
  };
222
222
  } & {
223
223
  query: {
@@ -229,11 +229,11 @@ export declare const u2Routes: OpenAPIHono<{
229
229
  };
230
230
  output: {};
231
231
  outputFormat: string;
232
- status: 302;
232
+ status: 400;
233
233
  } | {
234
234
  input: {
235
235
  param: {
236
- screen: "impersonate" | "login" | "signup" | "reset-password" | "account" | "invalid-session" | "consent" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
236
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "account" | "enter-password" | "try-connection-result" | "invalid-session" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation" | "device/complete";
237
237
  };
238
238
  } & {
239
239
  query: {
@@ -245,7 +245,7 @@ export declare const u2Routes: OpenAPIHono<{
245
245
  };
246
246
  output: {};
247
247
  outputFormat: string;
248
- status: 400;
248
+ status: 302;
249
249
  };
250
250
  };
251
251
  } & {
@@ -253,7 +253,7 @@ export declare const u2Routes: OpenAPIHono<{
253
253
  $post: {
254
254
  input: {
255
255
  param: {
256
- screen: "impersonate" | "login" | "signup" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
256
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
257
257
  };
258
258
  } & {
259
259
  query: {
@@ -271,7 +271,7 @@ export declare const u2Routes: OpenAPIHono<{
271
271
  } | {
272
272
  input: {
273
273
  param: {
274
- screen: "impersonate" | "login" | "signup" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "account/change-email" | "account/change-email/verify" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
274
+ screen: "impersonate" | "signup" | "login" | "consent" | "reset-password" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/magic-link-sent" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/change-email" | "account/change-email/verify" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "self-service/app" | "device/code" | "device/confirmation";
275
275
  };
276
276
  } & {
277
277
  query: {
@@ -280,7 +280,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
280
280
  }, {
281
281
  type: "passwordResetRequested";
282
282
  params: unknown;
283
- }, never, "pending" | "authenticated" | "failed" | "expired" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation" | "completed", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
283
+ }, never, "pending" | "failed" | "expired" | "completed" | "authenticated" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
284
284
  id: "loginSession";
285
285
  states: {
286
286
  readonly pending: {};
@@ -40,6 +40,7 @@ export type StrategyHandler = {
40
40
  redirectUrl: string;
41
41
  code: string;
42
42
  codeVerifier?: string;
43
+ formPost?: Record<string, string>;
43
44
  }>;
44
45
  validateAuthorizationCodeAndGetUser: (ctx: Context<{
45
46
  Bindings: Bindings;
@@ -50,6 +51,7 @@ export type StrategyHandler = {
50
51
  Variables: Variables;
51
52
  }>, connection: Connection, code: string, codeVerifier?: string) => Promise<UserInfoWithRaw>;
52
53
  disableEmbeddedBrowsers?: boolean;
54
+ singleUseState?: boolean;
53
55
  };
54
56
  export declare const BUILTIN_STRATEGIES: Record<string, StrategyHandler>;
55
57
  export declare function getStrategy(ctx: Context<{