authhero 9.31.0 → 9.34.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.
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/authhero.cjs +137 -137
- package/dist/authhero.d.ts +605 -392
- package/dist/authhero.mjs +16303 -15968
- package/dist/mfa-CDFRupfM.mjs +128 -0
- package/dist/mfa-DF3O3Z8H.js +1 -0
- package/dist/mfa-attempts-BOWgbEPg.js +275 -0
- package/dist/{mfa-attempts-Dl3I8pop.mjs → mfa-attempts-C06Bkdy9.mjs} +14352 -13847
- package/dist/{passkey-enrollment-2Toeaevy.js → passkey-enrollment-RGw-WaSq.js} +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +12 -1
- package/dist/types/authentication-flows/passwordless.d.ts +24 -11
- package/dist/types/authentication-flows/refresh-token.d.ts +1 -0
- package/dist/types/authentication-flows/remember-browser.d.ts +77 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/generated/locale-types.d.ts +6 -0
- package/dist/types/helpers/cimd.d.ts +8 -0
- package/dist/types/helpers/client.d.ts +25 -7
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/login-session-tenant.d.ts +22 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/session-transfer.d.ts +158 -0
- package/dist/types/hooks/lifecycle-codehooks.d.ts +1 -1
- package/dist/types/index.d.ts +536 -376
- package/dist/types/routes/auth-api/authorize.d.ts +6 -0
- package/dist/types/routes/auth-api/device.d.ts +8 -8
- package/dist/types/routes/auth-api/index.d.ts +49 -32
- package/dist/types/routes/auth-api/passwordless.d.ts +6 -6
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/revoke.d.ts +6 -6
- package/dist/types/routes/auth-api/token.d.ts +21 -10
- package/dist/types/routes/management-api/action-triggers.d.ts +25 -25
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +100 -32
- package/dist/types/routes/management-api/connections.d.ts +25 -25
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/failed-events.d.ts +2 -2
- package/dist/types/routes/management-api/forms.d.ts +144 -144
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/helpers.d.ts +11 -1
- package/dist/types/routes/management-api/hooks.d.ts +21 -21
- package/dist/types/routes/management-api/index.d.ts +480 -337
- package/dist/types/routes/management-api/jobs.d.ts +2 -2
- package/dist/types/routes/management-api/keys.d.ts +12 -12
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/organizations.d.ts +7 -7
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/refresh_tokens.d.ts +5 -0
- package/dist/types/routes/management-api/rollouts.d.ts +6 -6
- package/dist/types/routes/management-api/sessions.d.ts +5 -0
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenant-members.d.ts +8 -8
- package/dist/types/routes/management-api/tenant-operations.d.ts +4 -4
- package/dist/types/routes/management-api/tenants.d.ts +24 -16
- package/dist/types/routes/management-api/users.d.ts +84 -24
- package/dist/types/routes/universal-login/common.d.ts +57 -22
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/screens/mfa-remember-browser.d.ts +28 -0
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/state-machines/login-session.d.ts +7 -2
- package/dist/types/types/GrantFlowResult.d.ts +13 -0
- package/dist/types/types/Hooks.d.ts +24 -0
- package/dist/types/types/Variables.d.ts +12 -1
- package/dist/types/utils/cookies.d.ts +29 -0
- package/dist/types/utils/session-transfer-token.d.ts +56 -0
- package/package.json +6 -6
- package/dist/mfa-attempts-DXiY4U74.js +0 -275
|
@@ -231,7 +231,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
231
231
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
232
232
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
233
233
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
234
|
-
provisioning_state?: "
|
|
234
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
235
235
|
provisioning_error?: string | undefined;
|
|
236
236
|
provisioning_state_changed_at?: string | undefined;
|
|
237
237
|
bundle_configuration?: string | undefined;
|
|
@@ -279,7 +279,6 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
279
279
|
} | undefined;
|
|
280
280
|
} | undefined;
|
|
281
281
|
mfa?: {
|
|
282
|
-
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
283
282
|
factors?: {
|
|
284
283
|
sms: boolean;
|
|
285
284
|
otp: boolean;
|
|
@@ -302,6 +301,9 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
302
301
|
phone_message?: {
|
|
303
302
|
message?: string | undefined;
|
|
304
303
|
} | undefined;
|
|
304
|
+
allow_remember_browser?: boolean | undefined;
|
|
305
|
+
remember_browser_lifetime_in_days?: number | undefined;
|
|
306
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
305
307
|
} | undefined;
|
|
306
308
|
is_control_plane?: boolean | undefined;
|
|
307
309
|
has_children?: boolean | undefined;
|
|
@@ -369,7 +371,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
369
371
|
active?: boolean | undefined;
|
|
370
372
|
} | undefined;
|
|
371
373
|
signup?: {
|
|
372
|
-
status?: "
|
|
374
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
373
375
|
verification?: {
|
|
374
376
|
active?: boolean | undefined;
|
|
375
377
|
} | undefined;
|
|
@@ -379,14 +381,14 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
379
381
|
} | undefined;
|
|
380
382
|
unique?: boolean | undefined;
|
|
381
383
|
profile_required?: boolean | undefined;
|
|
382
|
-
verification_method?: "
|
|
384
|
+
verification_method?: "link" | "code" | undefined;
|
|
383
385
|
} | undefined;
|
|
384
386
|
username?: {
|
|
385
387
|
identifier?: {
|
|
386
388
|
active?: boolean | undefined;
|
|
387
389
|
} | undefined;
|
|
388
390
|
signup?: {
|
|
389
|
-
status?: "
|
|
391
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
390
392
|
} | undefined;
|
|
391
393
|
validation?: {
|
|
392
394
|
max_length?: number | undefined;
|
|
@@ -403,7 +405,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
403
405
|
active?: boolean | undefined;
|
|
404
406
|
} | undefined;
|
|
405
407
|
signup?: {
|
|
406
|
-
status?: "
|
|
408
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
407
409
|
} | undefined;
|
|
408
410
|
} | undefined;
|
|
409
411
|
} | undefined;
|
|
@@ -444,7 +446,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
444
446
|
}[];
|
|
445
447
|
description?: string | undefined;
|
|
446
448
|
client_secret?: string | undefined;
|
|
447
|
-
app_type?: "
|
|
449
|
+
app_type?: "resource_server" | "native" | "spa" | "regular_web" | "non_interactive" | "express_configuration" | "rms" | "box" | "cloudbees" | "concur" | "dropbox" | "mscrm" | "echosign" | "egnyte" | "newrelic" | "office365" | "salesforce" | "sentry" | "sharepoint" | "slack" | "springcm" | "zendesk" | "zoom" | "sso_integration" | "oag" | undefined;
|
|
448
450
|
logo_uri?: string | undefined;
|
|
449
451
|
callbacks?: string[] | undefined;
|
|
450
452
|
allowed_origins?: string[] | undefined;
|
|
@@ -452,7 +454,17 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
452
454
|
client_aliases?: string[] | undefined;
|
|
453
455
|
allowed_clients?: string[] | undefined;
|
|
454
456
|
allowed_logout_urls?: string[] | undefined;
|
|
455
|
-
session_transfer?:
|
|
457
|
+
session_transfer?: {
|
|
458
|
+
[x: string]: unknown;
|
|
459
|
+
can_create_session_transfer_token?: boolean | undefined;
|
|
460
|
+
enforce_cascade_revocation?: boolean | undefined;
|
|
461
|
+
allowed_authentication_methods?: ("query" | "cookie")[] | undefined;
|
|
462
|
+
enforce_device_binding?: "none" | "ip" | "asn" | undefined;
|
|
463
|
+
allow_refresh_token?: boolean | undefined;
|
|
464
|
+
enforce_online_refresh_tokens?: boolean | undefined;
|
|
465
|
+
allow_onward_transfer?: boolean | undefined;
|
|
466
|
+
trust_forwarded_ip?: boolean | undefined;
|
|
467
|
+
} | undefined;
|
|
456
468
|
oidc_logout?: {
|
|
457
469
|
[x: string]: unknown;
|
|
458
470
|
backchannel_logout_urls?: string[] | undefined;
|
|
@@ -471,7 +483,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
471
483
|
custom_login_page_preview?: string | undefined;
|
|
472
484
|
form_template?: string | undefined;
|
|
473
485
|
addons?: Record<string, any> | undefined;
|
|
474
|
-
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "
|
|
486
|
+
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "private_key_jwt" | "client_secret_jwt" | undefined;
|
|
475
487
|
client_metadata?: Record<string, string> | undefined;
|
|
476
488
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
477
489
|
mobile?: Record<string, any> | undefined;
|
|
@@ -614,7 +626,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
614
626
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
615
627
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
616
628
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
617
|
-
provisioning_state?: "
|
|
629
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
618
630
|
provisioning_error?: string | undefined;
|
|
619
631
|
provisioning_state_changed_at?: string | undefined;
|
|
620
632
|
bundle_configuration?: string | undefined;
|
|
@@ -662,7 +674,6 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
662
674
|
} | undefined;
|
|
663
675
|
} | undefined;
|
|
664
676
|
mfa?: {
|
|
665
|
-
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
666
677
|
factors?: {
|
|
667
678
|
sms: boolean;
|
|
668
679
|
otp: boolean;
|
|
@@ -685,6 +696,9 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
685
696
|
phone_message?: {
|
|
686
697
|
message?: string | undefined;
|
|
687
698
|
} | undefined;
|
|
699
|
+
allow_remember_browser?: boolean | undefined;
|
|
700
|
+
remember_browser_lifetime_in_days?: number | undefined;
|
|
701
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
688
702
|
} | undefined;
|
|
689
703
|
is_control_plane?: boolean | undefined;
|
|
690
704
|
has_children?: boolean | undefined;
|
|
@@ -743,6 +757,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
743
757
|
strategy_type: string;
|
|
744
758
|
} | undefined;
|
|
745
759
|
authenticated_at?: string | undefined;
|
|
760
|
+
tenant_id?: string | undefined;
|
|
746
761
|
};
|
|
747
762
|
}>;
|
|
748
763
|
export interface InitJSXRouteWithSessionOptions {
|
|
@@ -983,7 +998,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
983
998
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
984
999
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
985
1000
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
986
|
-
provisioning_state?: "
|
|
1001
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
987
1002
|
provisioning_error?: string | undefined;
|
|
988
1003
|
provisioning_state_changed_at?: string | undefined;
|
|
989
1004
|
bundle_configuration?: string | undefined;
|
|
@@ -1031,7 +1046,6 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1031
1046
|
} | undefined;
|
|
1032
1047
|
} | undefined;
|
|
1033
1048
|
mfa?: {
|
|
1034
|
-
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
1035
1049
|
factors?: {
|
|
1036
1050
|
sms: boolean;
|
|
1037
1051
|
otp: boolean;
|
|
@@ -1054,6 +1068,9 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1054
1068
|
phone_message?: {
|
|
1055
1069
|
message?: string | undefined;
|
|
1056
1070
|
} | undefined;
|
|
1071
|
+
allow_remember_browser?: boolean | undefined;
|
|
1072
|
+
remember_browser_lifetime_in_days?: number | undefined;
|
|
1073
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
1057
1074
|
} | undefined;
|
|
1058
1075
|
is_control_plane?: boolean | undefined;
|
|
1059
1076
|
has_children?: boolean | undefined;
|
|
@@ -1121,7 +1138,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1121
1138
|
active?: boolean | undefined;
|
|
1122
1139
|
} | undefined;
|
|
1123
1140
|
signup?: {
|
|
1124
|
-
status?: "
|
|
1141
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
1125
1142
|
verification?: {
|
|
1126
1143
|
active?: boolean | undefined;
|
|
1127
1144
|
} | undefined;
|
|
@@ -1131,14 +1148,14 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1131
1148
|
} | undefined;
|
|
1132
1149
|
unique?: boolean | undefined;
|
|
1133
1150
|
profile_required?: boolean | undefined;
|
|
1134
|
-
verification_method?: "
|
|
1151
|
+
verification_method?: "link" | "code" | undefined;
|
|
1135
1152
|
} | undefined;
|
|
1136
1153
|
username?: {
|
|
1137
1154
|
identifier?: {
|
|
1138
1155
|
active?: boolean | undefined;
|
|
1139
1156
|
} | undefined;
|
|
1140
1157
|
signup?: {
|
|
1141
|
-
status?: "
|
|
1158
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
1142
1159
|
} | undefined;
|
|
1143
1160
|
validation?: {
|
|
1144
1161
|
max_length?: number | undefined;
|
|
@@ -1155,7 +1172,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1155
1172
|
active?: boolean | undefined;
|
|
1156
1173
|
} | undefined;
|
|
1157
1174
|
signup?: {
|
|
1158
|
-
status?: "
|
|
1175
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
1159
1176
|
} | undefined;
|
|
1160
1177
|
} | undefined;
|
|
1161
1178
|
} | undefined;
|
|
@@ -1196,7 +1213,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1196
1213
|
}[];
|
|
1197
1214
|
description?: string | undefined;
|
|
1198
1215
|
client_secret?: string | undefined;
|
|
1199
|
-
app_type?: "
|
|
1216
|
+
app_type?: "resource_server" | "native" | "spa" | "regular_web" | "non_interactive" | "express_configuration" | "rms" | "box" | "cloudbees" | "concur" | "dropbox" | "mscrm" | "echosign" | "egnyte" | "newrelic" | "office365" | "salesforce" | "sentry" | "sharepoint" | "slack" | "springcm" | "zendesk" | "zoom" | "sso_integration" | "oag" | undefined;
|
|
1200
1217
|
logo_uri?: string | undefined;
|
|
1201
1218
|
callbacks?: string[] | undefined;
|
|
1202
1219
|
allowed_origins?: string[] | undefined;
|
|
@@ -1204,7 +1221,17 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1204
1221
|
client_aliases?: string[] | undefined;
|
|
1205
1222
|
allowed_clients?: string[] | undefined;
|
|
1206
1223
|
allowed_logout_urls?: string[] | undefined;
|
|
1207
|
-
session_transfer?:
|
|
1224
|
+
session_transfer?: {
|
|
1225
|
+
[x: string]: unknown;
|
|
1226
|
+
can_create_session_transfer_token?: boolean | undefined;
|
|
1227
|
+
enforce_cascade_revocation?: boolean | undefined;
|
|
1228
|
+
allowed_authentication_methods?: ("query" | "cookie")[] | undefined;
|
|
1229
|
+
enforce_device_binding?: "none" | "ip" | "asn" | undefined;
|
|
1230
|
+
allow_refresh_token?: boolean | undefined;
|
|
1231
|
+
enforce_online_refresh_tokens?: boolean | undefined;
|
|
1232
|
+
allow_onward_transfer?: boolean | undefined;
|
|
1233
|
+
trust_forwarded_ip?: boolean | undefined;
|
|
1234
|
+
} | undefined;
|
|
1208
1235
|
oidc_logout?: {
|
|
1209
1236
|
[x: string]: unknown;
|
|
1210
1237
|
backchannel_logout_urls?: string[] | undefined;
|
|
@@ -1223,7 +1250,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1223
1250
|
custom_login_page_preview?: string | undefined;
|
|
1224
1251
|
form_template?: string | undefined;
|
|
1225
1252
|
addons?: Record<string, any> | undefined;
|
|
1226
|
-
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "
|
|
1253
|
+
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "private_key_jwt" | "client_secret_jwt" | undefined;
|
|
1227
1254
|
client_metadata?: Record<string, string> | undefined;
|
|
1228
1255
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
1229
1256
|
mobile?: Record<string, any> | undefined;
|
|
@@ -1435,7 +1462,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1435
1462
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
1436
1463
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
1437
1464
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
1438
|
-
provisioning_state?: "
|
|
1465
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
1439
1466
|
provisioning_error?: string | undefined;
|
|
1440
1467
|
provisioning_state_changed_at?: string | undefined;
|
|
1441
1468
|
bundle_configuration?: string | undefined;
|
|
@@ -1483,7 +1510,6 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1483
1510
|
} | undefined;
|
|
1484
1511
|
} | undefined;
|
|
1485
1512
|
mfa?: {
|
|
1486
|
-
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
1487
1513
|
factors?: {
|
|
1488
1514
|
sms: boolean;
|
|
1489
1515
|
otp: boolean;
|
|
@@ -1506,6 +1532,9 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1506
1532
|
phone_message?: {
|
|
1507
1533
|
message?: string | undefined;
|
|
1508
1534
|
} | undefined;
|
|
1535
|
+
allow_remember_browser?: boolean | undefined;
|
|
1536
|
+
remember_browser_lifetime_in_days?: number | undefined;
|
|
1537
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
1509
1538
|
} | undefined;
|
|
1510
1539
|
is_control_plane?: boolean | undefined;
|
|
1511
1540
|
has_children?: boolean | undefined;
|
|
@@ -1564,6 +1593,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1564
1593
|
strategy_type: string;
|
|
1565
1594
|
} | undefined;
|
|
1566
1595
|
authenticated_at?: string | undefined;
|
|
1596
|
+
tenant_id?: string | undefined;
|
|
1567
1597
|
};
|
|
1568
1598
|
session: {
|
|
1569
1599
|
created_at: string;
|
|
@@ -1593,6 +1623,11 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1593
1623
|
type?: string | undefined;
|
|
1594
1624
|
}[];
|
|
1595
1625
|
} | undefined;
|
|
1626
|
+
session_transfer?: {
|
|
1627
|
+
client_id: string;
|
|
1628
|
+
family_id: string;
|
|
1629
|
+
cascade_revocation: boolean;
|
|
1630
|
+
} | undefined;
|
|
1596
1631
|
} | null;
|
|
1597
1632
|
isContinuation: boolean;
|
|
1598
1633
|
}>;
|
|
@@ -43,7 +43,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
43
43
|
hint?: string | undefined;
|
|
44
44
|
messages?: {
|
|
45
45
|
text: string;
|
|
46
|
-
type: "
|
|
46
|
+
type: "error" | "success" | "info" | "warning";
|
|
47
47
|
id?: number | undefined;
|
|
48
48
|
}[] | undefined;
|
|
49
49
|
}[];
|
|
@@ -51,7 +51,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
51
51
|
description?: string | undefined;
|
|
52
52
|
messages?: {
|
|
53
53
|
text: string;
|
|
54
|
-
type: "
|
|
54
|
+
type: "error" | "success" | "info" | "warning";
|
|
55
55
|
id?: number | undefined;
|
|
56
56
|
}[] | undefined;
|
|
57
57
|
links?: {
|
|
@@ -123,7 +123,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
123
123
|
hint?: string | undefined;
|
|
124
124
|
messages?: {
|
|
125
125
|
text: string;
|
|
126
|
-
type: "
|
|
126
|
+
type: "error" | "success" | "info" | "warning";
|
|
127
127
|
id?: number | undefined;
|
|
128
128
|
}[] | undefined;
|
|
129
129
|
}[];
|
|
@@ -131,7 +131,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
131
131
|
description?: string | undefined;
|
|
132
132
|
messages?: {
|
|
133
133
|
text: string;
|
|
134
|
-
type: "
|
|
134
|
+
type: "error" | "success" | "info" | "warning";
|
|
135
135
|
id?: number | undefined;
|
|
136
136
|
}[] | undefined;
|
|
137
137
|
links?: {
|
|
@@ -220,7 +220,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
220
220
|
hint?: string | undefined;
|
|
221
221
|
messages?: {
|
|
222
222
|
text: string;
|
|
223
|
-
type: "
|
|
223
|
+
type: "error" | "success" | "info" | "warning";
|
|
224
224
|
id?: number | undefined;
|
|
225
225
|
}[] | undefined;
|
|
226
226
|
}[];
|
|
@@ -228,7 +228,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
228
228
|
description?: string | undefined;
|
|
229
229
|
messages?: {
|
|
230
230
|
text: string;
|
|
231
|
-
type: "
|
|
231
|
+
type: "error" | "success" | "info" | "warning";
|
|
232
232
|
id?: number | undefined;
|
|
233
233
|
}[] | undefined;
|
|
234
234
|
links?: {
|
|
@@ -335,7 +335,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
335
335
|
hint?: string | undefined;
|
|
336
336
|
messages?: {
|
|
337
337
|
text: string;
|
|
338
|
-
type: "
|
|
338
|
+
type: "error" | "success" | "info" | "warning";
|
|
339
339
|
id?: number | undefined;
|
|
340
340
|
}[] | undefined;
|
|
341
341
|
}[];
|
|
@@ -343,7 +343,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
343
343
|
description?: string | undefined;
|
|
344
344
|
messages?: {
|
|
345
345
|
text: string;
|
|
346
|
-
type: "
|
|
346
|
+
type: "error" | "success" | "info" | "warning";
|
|
347
347
|
id?: number | undefined;
|
|
348
348
|
}[] | undefined;
|
|
349
349
|
links?: {
|
|
@@ -30,7 +30,7 @@ export declare const identifierRoutes: OpenAPIHono<{
|
|
|
30
30
|
} & {
|
|
31
31
|
form: {
|
|
32
32
|
username: string;
|
|
33
|
-
login_selection?: "
|
|
33
|
+
login_selection?: "password" | "code" | undefined;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
output: {};
|
|
@@ -44,7 +44,7 @@ export declare const identifierRoutes: OpenAPIHono<{
|
|
|
44
44
|
} & {
|
|
45
45
|
form: {
|
|
46
46
|
username: string;
|
|
47
|
-
login_selection?: "
|
|
47
|
+
login_selection?: "password" | "code" | undefined;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
output: {};
|
|
@@ -515,7 +515,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
515
515
|
} & {
|
|
516
516
|
form: {
|
|
517
517
|
username: string;
|
|
518
|
-
login_selection?: "
|
|
518
|
+
login_selection?: "password" | "code" | undefined;
|
|
519
519
|
};
|
|
520
520
|
};
|
|
521
521
|
output: {};
|
|
@@ -529,7 +529,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
529
529
|
} & {
|
|
530
530
|
form: {
|
|
531
531
|
username: string;
|
|
532
|
-
login_selection?: "
|
|
532
|
+
login_selection?: "password" | "code" | undefined;
|
|
533
533
|
};
|
|
534
534
|
};
|
|
535
535
|
output: {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "remember this device" option on the MFA challenge screens (#1670).
|
|
3
|
+
* See authentication-flows/remember-browser.ts for what remembering does.
|
|
4
|
+
*/
|
|
5
|
+
import type { FormNodeComponent, LoginSession } from "@authhero/adapter-interfaces";
|
|
6
|
+
import type { EnrichedClient } from "../../../helpers/client";
|
|
7
|
+
import type { ScreenContext } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* The checkbox, or undefined when remembering isn't allowed for the MFA this
|
|
10
|
+
* login is going through. `label` receives the lifetime in days.
|
|
11
|
+
*/
|
|
12
|
+
export declare function rememberBrowserComponent(context: ScreenContext, label: (days: number) => string, order: number): Promise<FormNodeComponent | undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* Set-Cookie values that remember the browser, when the user ticked the box
|
|
15
|
+
* and remembering is allowed. Best-effort: a failure only means the user is
|
|
16
|
+
* asked for MFA again next time, so it never fails the login.
|
|
17
|
+
*/
|
|
18
|
+
export declare function rememberBrowserCookies(ctx: ScreenContext["ctx"], client: EnrichedClient, loginSession: LoginSession, userId: string, data: Record<string, unknown>): Promise<string[]>;
|
|
19
|
+
/**
|
|
20
|
+
* The POST result for a finished MFA challenge: the auth flow's response plus
|
|
21
|
+
* the remember-browser cookies, if any.
|
|
22
|
+
*/
|
|
23
|
+
export declare function withRememberBrowserCookies(result: Response, rememberCookies: string[]): {
|
|
24
|
+
redirect: string;
|
|
25
|
+
cookies: string[];
|
|
26
|
+
} | {
|
|
27
|
+
response: Response;
|
|
28
|
+
};
|
|
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
165
165
|
$get: {
|
|
166
166
|
input: {
|
|
167
167
|
param: {
|
|
168
|
-
screen: "reset-password" | "impersonate" | "
|
|
168
|
+
screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation" | "device/complete";
|
|
169
169
|
};
|
|
170
170
|
} & {
|
|
171
171
|
query: {
|
|
@@ -181,7 +181,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
181
181
|
} | {
|
|
182
182
|
input: {
|
|
183
183
|
param: {
|
|
184
|
-
screen: "reset-password" | "impersonate" | "
|
|
184
|
+
screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation" | "device/complete";
|
|
185
185
|
};
|
|
186
186
|
} & {
|
|
187
187
|
query: {
|
|
@@ -197,7 +197,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
197
197
|
} | {
|
|
198
198
|
input: {
|
|
199
199
|
param: {
|
|
200
|
-
screen: "reset-password" | "impersonate" | "
|
|
200
|
+
screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation" | "device/complete";
|
|
201
201
|
};
|
|
202
202
|
} & {
|
|
203
203
|
query: {
|
|
@@ -217,7 +217,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
217
217
|
$post: {
|
|
218
218
|
input: {
|
|
219
219
|
param: {
|
|
220
|
-
screen: "reset-password" | "impersonate" | "
|
|
220
|
+
screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation";
|
|
221
221
|
};
|
|
222
222
|
} & {
|
|
223
223
|
query: {
|
|
@@ -235,7 +235,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
235
235
|
} | {
|
|
236
236
|
input: {
|
|
237
237
|
param: {
|
|
238
|
-
screen: "reset-password" | "impersonate" | "
|
|
238
|
+
screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation";
|
|
239
239
|
};
|
|
240
240
|
} & {
|
|
241
241
|
query: {
|
|
@@ -170,7 +170,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
170
170
|
$get: {
|
|
171
171
|
input: {
|
|
172
172
|
param: {
|
|
173
|
-
screen: "reset-password" | "impersonate" | "
|
|
173
|
+
screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation" | "device/complete";
|
|
174
174
|
};
|
|
175
175
|
} & {
|
|
176
176
|
query: {
|
|
@@ -186,7 +186,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
186
186
|
} | {
|
|
187
187
|
input: {
|
|
188
188
|
param: {
|
|
189
|
-
screen: "reset-password" | "impersonate" | "
|
|
189
|
+
screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation" | "device/complete";
|
|
190
190
|
};
|
|
191
191
|
} & {
|
|
192
192
|
query: {
|
|
@@ -202,7 +202,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
202
202
|
} | {
|
|
203
203
|
input: {
|
|
204
204
|
param: {
|
|
205
|
-
screen: "reset-password" | "impersonate" | "
|
|
205
|
+
screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation" | "device/complete";
|
|
206
206
|
};
|
|
207
207
|
} & {
|
|
208
208
|
query: {
|
|
@@ -222,7 +222,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
222
222
|
$post: {
|
|
223
223
|
input: {
|
|
224
224
|
param: {
|
|
225
|
-
screen: "reset-password" | "impersonate" | "
|
|
225
|
+
screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation";
|
|
226
226
|
};
|
|
227
227
|
} & {
|
|
228
228
|
query: {
|
|
@@ -240,7 +240,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
240
240
|
} | {
|
|
241
241
|
input: {
|
|
242
242
|
param: {
|
|
243
|
-
screen: "reset-password" | "impersonate" | "
|
|
243
|
+
screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "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" | "device/code" | "device/confirmation";
|
|
244
244
|
};
|
|
245
245
|
} & {
|
|
246
246
|
query: {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { type PasswordResetFlow } from "./password-reset";
|
|
2
2
|
import { LoginSession, LoginSessionState } from "@authhero/adapter-interfaces";
|
|
3
3
|
import type { SessionCookieDiagnostics } from "../utils/cookies";
|
|
4
|
+
import type { SessionTransferCarrierState } from "../helpers/session-transfer";
|
|
4
5
|
export interface MfaRequiredByAction {
|
|
5
6
|
/** The provider the (last enabling) action passed, e.g. "any". */
|
|
6
7
|
provider: string;
|
|
7
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Whether a remembered browser may satisfy this MFA. True only if every
|
|
10
|
+
* enabling call allowed it (see authentication-flows/remember-browser.ts).
|
|
11
|
+
*/
|
|
8
12
|
allow_remember_browser: boolean;
|
|
9
13
|
}
|
|
10
14
|
/** Persisted context, grouped by responsibility in types, flat on disk. */
|
|
@@ -48,6 +52,7 @@ export interface LoginSessionData {
|
|
|
48
52
|
};
|
|
49
53
|
try_connection_result?: unknown;
|
|
50
54
|
session_cookie?: SessionCookieDiagnostics;
|
|
55
|
+
session_transfer?: SessionTransferCarrierState;
|
|
51
56
|
}
|
|
52
57
|
/** The on-disk JSON shape stays flat for compatibility with existing sessions. */
|
|
53
58
|
export declare function readLoginSessionData(raw?: string | null): LoginSessionData;
|
|
@@ -229,7 +234,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
|
|
|
229
234
|
}, {
|
|
230
235
|
type: "passwordResetRequested";
|
|
231
236
|
params: unknown;
|
|
232
|
-
}, never, "
|
|
237
|
+
}, never, "pending" | "failed" | "expired" | "authenticated" | "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, {
|
|
233
238
|
id: "loginSession";
|
|
234
239
|
states: {
|
|
235
240
|
readonly pending: {};
|
|
@@ -24,6 +24,19 @@ export interface GrantFlowResult {
|
|
|
24
24
|
auth_time?: number;
|
|
25
25
|
/** The connection name used for authentication (e.g., "email", "google-oauth2") */
|
|
26
26
|
authConnection?: string;
|
|
27
|
+
authStrategy?: {
|
|
28
|
+
strategy: string;
|
|
29
|
+
strategy_type: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Set when the refresh-token grant was asked for a session_transfer_token
|
|
33
|
+
* (`audience=urn:{domain}:session_transfer`). The token endpoint returns
|
|
34
|
+
* `token` in place of an access token; `audience` is what the request named.
|
|
35
|
+
*/
|
|
36
|
+
session_transfer?: {
|
|
37
|
+
token: string;
|
|
38
|
+
audience: string;
|
|
39
|
+
};
|
|
27
40
|
}
|
|
28
41
|
export interface GrantFlowUserResult extends GrantFlowResult {
|
|
29
42
|
user: User;
|
|
@@ -111,6 +111,30 @@ export type HookEvent = {
|
|
|
111
111
|
last_ip?: string;
|
|
112
112
|
last_user_agent?: string;
|
|
113
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Present when the session was created by redeeming a
|
|
116
|
+
* session_transfer_token. `parent_refresh_token.id` is the rotation family
|
|
117
|
+
* of the refresh token the token was minted from.
|
|
118
|
+
*/
|
|
119
|
+
session_transfer?: {
|
|
120
|
+
client_id: string;
|
|
121
|
+
parent_refresh_token: {
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Present on the login that redeemed a session_transfer_token. `client_id`
|
|
128
|
+
* is the client that minted it and `request` describes the minting request.
|
|
129
|
+
*/
|
|
130
|
+
session_transfer_token?: {
|
|
131
|
+
client_id: string;
|
|
132
|
+
scope?: string;
|
|
133
|
+
request: {
|
|
134
|
+
ip: string;
|
|
135
|
+
asn?: string;
|
|
136
|
+
user_agent?: string;
|
|
137
|
+
};
|
|
114
138
|
};
|
|
115
139
|
security_context?: {
|
|
116
140
|
ja3?: string;
|