authhero 9.28.2 → 9.29.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 +171 -442
- package/dist/authhero.d.ts +296 -247
- package/dist/authhero.mjs +26866 -54765
- package/dist/mfa-attempts-CQiD6hxP.mjs +26774 -0
- package/dist/mfa-attempts-DwATCXqC.js +254 -0
- package/dist/passkey-enrollment-D_WVyvv2.js +1 -0
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +4 -0
- package/dist/types/authentication-flows/mfa-attempts.d.ts +45 -0
- package/dist/types/authentication-flows/mfa.d.ts +20 -5
- package/dist/types/authentication-flows/passwordless.d.ts +6 -6
- package/dist/types/generated/locale-types.d.ts +6 -0
- package/dist/types/helpers/client.d.ts +2 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/session-mfa.d.ts +29 -0
- package/dist/types/hooks/post-user-login.d.ts +13 -0
- package/dist/types/index.d.ts +275 -247
- package/dist/types/routes/auth-api/account.d.ts +2 -2
- package/dist/types/routes/auth-api/device.d.ts +8 -8
- package/dist/types/routes/auth-api/index.d.ts +29 -29
- package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
- package/dist/types/routes/auth-api/passwordless.d.ts +16 -16
- package/dist/types/routes/auth-api/revoke.d.ts +6 -6
- package/dist/types/routes/management-api/action-executions.d.ts +1 -1
- package/dist/types/routes/management-api/action-triggers.d.ts +4 -4
- package/dist/types/routes/management-api/actions.d.ts +13 -13
- package/dist/types/routes/management-api/branding.d.ts +19 -19
- package/dist/types/routes/management-api/clients.d.ts +4 -4
- package/dist/types/routes/management-api/connections.d.ts +14 -14
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/emails.d.ts +6 -6
- package/dist/types/routes/management-api/failed-events.d.ts +4 -4
- package/dist/types/routes/management-api/flows.d.ts +8 -8
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/helpers.d.ts +1 -1
- package/dist/types/routes/management-api/hooks.d.ts +35 -35
- package/dist/types/routes/management-api/index.d.ts +231 -203
- package/dist/types/routes/management-api/keys.d.ts +8 -8
- package/dist/types/routes/management-api/log-streams.d.ts +6 -6
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +8 -8
- package/dist/types/routes/management-api/prompts.d.ts +8 -8
- package/dist/types/routes/management-api/resource-servers.d.ts +8 -8
- package/dist/types/routes/management-api/roles.d.ts +6 -6
- package/dist/types/routes/management-api/rollouts.d.ts +6 -6
- package/dist/types/routes/management-api/sessions.d.ts +7 -0
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenant-operations.d.ts +9 -9
- package/dist/types/routes/management-api/tenants.d.ts +18 -18
- package/dist/types/routes/management-api/themes.d.ts +9 -9
- package/dist/types/routes/management-api/users.d.ts +30 -9
- package/dist/types/routes/saml/index.d.ts +6 -6
- package/dist/types/routes/saml/samlp.d.ts +6 -6
- package/dist/types/routes/universal-login/common.d.ts +27 -20
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/impersonate.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +4 -4
- 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 +19 -1
- package/dist/types/types/AuthHeroConfig.d.ts +9 -0
- package/dist/types/types/Hooks.d.ts +10 -0
- package/dist/types/utils/totp.d.ts +6 -1
- package/package.json +6 -6
- package/dist/passkey-enrollment-CB7HjMH_.js +0 -1
|
@@ -71,13 +71,13 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
71
71
|
page_background: {
|
|
72
72
|
background_color: string;
|
|
73
73
|
background_image_url: string;
|
|
74
|
-
page_layout: "
|
|
74
|
+
page_layout: "left" | "right" | "center";
|
|
75
75
|
logo_placement?: "none" | "widget" | "chip" | undefined;
|
|
76
76
|
};
|
|
77
77
|
widget: {
|
|
78
|
-
header_text_alignment: "
|
|
78
|
+
header_text_alignment: "left" | "right" | "center";
|
|
79
79
|
logo_height: number;
|
|
80
|
-
logo_position: "none" | "
|
|
80
|
+
logo_position: "none" | "left" | "right" | "center";
|
|
81
81
|
logo_url: string;
|
|
82
82
|
social_buttons_layout: "bottom" | "top";
|
|
83
83
|
};
|
|
@@ -100,7 +100,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
100
100
|
url: string;
|
|
101
101
|
} | undefined;
|
|
102
102
|
dark_mode?: "dark" | "light" | "auto" | undefined;
|
|
103
|
-
scope?: "
|
|
103
|
+
scope?: "shared" | "local" | "platform" | undefined;
|
|
104
104
|
override?: "none" | "secrets" | "fields" | undefined;
|
|
105
105
|
enforce?: boolean | undefined;
|
|
106
106
|
} | null;
|
|
@@ -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?: "pending" | "
|
|
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,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
279
279
|
} | undefined;
|
|
280
280
|
} | undefined;
|
|
281
281
|
mfa?: {
|
|
282
|
-
policy?: "never" | "always" | undefined;
|
|
282
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
283
283
|
factors?: {
|
|
284
284
|
sms: boolean;
|
|
285
285
|
otp: boolean;
|
|
@@ -379,7 +379,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
379
379
|
} | undefined;
|
|
380
380
|
unique?: boolean | undefined;
|
|
381
381
|
profile_required?: boolean | undefined;
|
|
382
|
-
verification_method?: "
|
|
382
|
+
verification_method?: "link" | "code" | undefined;
|
|
383
383
|
} | undefined;
|
|
384
384
|
username?: {
|
|
385
385
|
identifier?: {
|
|
@@ -429,7 +429,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
429
429
|
} | undefined;
|
|
430
430
|
set_user_root_attributes?: "on_each_login" | "on_first_login" | "never_on_login" | undefined;
|
|
431
431
|
};
|
|
432
|
-
scope?: "
|
|
432
|
+
scope?: "shared" | "local" | "platform" | undefined;
|
|
433
433
|
override?: "none" | "secrets" | "fields" | undefined;
|
|
434
434
|
enforce?: boolean | undefined;
|
|
435
435
|
id?: string | undefined;
|
|
@@ -614,7 +614,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
614
614
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
615
615
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
616
616
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
617
|
-
provisioning_state?: "pending" | "
|
|
617
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
618
618
|
provisioning_error?: string | undefined;
|
|
619
619
|
provisioning_state_changed_at?: string | undefined;
|
|
620
620
|
bundle_configuration?: string | undefined;
|
|
@@ -662,7 +662,7 @@ export declare function initJSXRoute(ctx: Context<{
|
|
|
662
662
|
} | undefined;
|
|
663
663
|
} | undefined;
|
|
664
664
|
mfa?: {
|
|
665
|
-
policy?: "never" | "always" | undefined;
|
|
665
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
666
666
|
factors?: {
|
|
667
667
|
sms: boolean;
|
|
668
668
|
otp: boolean;
|
|
@@ -823,13 +823,13 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
823
823
|
page_background: {
|
|
824
824
|
background_color: string;
|
|
825
825
|
background_image_url: string;
|
|
826
|
-
page_layout: "
|
|
826
|
+
page_layout: "left" | "right" | "center";
|
|
827
827
|
logo_placement?: "none" | "widget" | "chip" | undefined;
|
|
828
828
|
};
|
|
829
829
|
widget: {
|
|
830
|
-
header_text_alignment: "
|
|
830
|
+
header_text_alignment: "left" | "right" | "center";
|
|
831
831
|
logo_height: number;
|
|
832
|
-
logo_position: "none" | "
|
|
832
|
+
logo_position: "none" | "left" | "right" | "center";
|
|
833
833
|
logo_url: string;
|
|
834
834
|
social_buttons_layout: "bottom" | "top";
|
|
835
835
|
};
|
|
@@ -852,7 +852,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
852
852
|
url: string;
|
|
853
853
|
} | undefined;
|
|
854
854
|
dark_mode?: "dark" | "light" | "auto" | undefined;
|
|
855
|
-
scope?: "
|
|
855
|
+
scope?: "shared" | "local" | "platform" | undefined;
|
|
856
856
|
override?: "none" | "secrets" | "fields" | undefined;
|
|
857
857
|
enforce?: boolean | undefined;
|
|
858
858
|
} | null;
|
|
@@ -983,7 +983,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
983
983
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
984
984
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
985
985
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
986
|
-
provisioning_state?: "pending" | "
|
|
986
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
987
987
|
provisioning_error?: string | undefined;
|
|
988
988
|
provisioning_state_changed_at?: string | undefined;
|
|
989
989
|
bundle_configuration?: string | undefined;
|
|
@@ -1031,7 +1031,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1031
1031
|
} | undefined;
|
|
1032
1032
|
} | undefined;
|
|
1033
1033
|
mfa?: {
|
|
1034
|
-
policy?: "never" | "always" | undefined;
|
|
1034
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
1035
1035
|
factors?: {
|
|
1036
1036
|
sms: boolean;
|
|
1037
1037
|
otp: boolean;
|
|
@@ -1131,7 +1131,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1131
1131
|
} | undefined;
|
|
1132
1132
|
unique?: boolean | undefined;
|
|
1133
1133
|
profile_required?: boolean | undefined;
|
|
1134
|
-
verification_method?: "
|
|
1134
|
+
verification_method?: "link" | "code" | undefined;
|
|
1135
1135
|
} | undefined;
|
|
1136
1136
|
username?: {
|
|
1137
1137
|
identifier?: {
|
|
@@ -1181,7 +1181,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1181
1181
|
} | undefined;
|
|
1182
1182
|
set_user_root_attributes?: "on_each_login" | "on_first_login" | "never_on_login" | undefined;
|
|
1183
1183
|
};
|
|
1184
|
-
scope?: "
|
|
1184
|
+
scope?: "shared" | "local" | "platform" | undefined;
|
|
1185
1185
|
override?: "none" | "secrets" | "fields" | undefined;
|
|
1186
1186
|
enforce?: boolean | undefined;
|
|
1187
1187
|
id?: string | undefined;
|
|
@@ -1435,7 +1435,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1435
1435
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
1436
1436
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
1437
1437
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
1438
|
-
provisioning_state?: "pending" | "
|
|
1438
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
1439
1439
|
provisioning_error?: string | undefined;
|
|
1440
1440
|
provisioning_state_changed_at?: string | undefined;
|
|
1441
1441
|
bundle_configuration?: string | undefined;
|
|
@@ -1483,7 +1483,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1483
1483
|
} | undefined;
|
|
1484
1484
|
} | undefined;
|
|
1485
1485
|
mfa?: {
|
|
1486
|
-
policy?: "never" | "always" | undefined;
|
|
1486
|
+
policy?: "never" | "always" | "all-applications" | "confidence-score" | undefined;
|
|
1487
1487
|
factors?: {
|
|
1488
1488
|
sms: boolean;
|
|
1489
1489
|
otp: boolean;
|
|
@@ -1586,6 +1586,13 @@ export declare function initJSXRouteWithSession(ctx: Context<{
|
|
|
1586
1586
|
used_at?: string | undefined;
|
|
1587
1587
|
expires_at?: string | undefined;
|
|
1588
1588
|
idle_expires_at?: string | undefined;
|
|
1589
|
+
authentication?: {
|
|
1590
|
+
methods: {
|
|
1591
|
+
name: string;
|
|
1592
|
+
timestamp: string;
|
|
1593
|
+
type?: string | undefined;
|
|
1594
|
+
}[];
|
|
1595
|
+
} | undefined;
|
|
1589
1596
|
} | null;
|
|
1590
1597
|
isContinuation: boolean;
|
|
1591
1598
|
}>;
|
|
@@ -30,7 +30,7 @@ export declare const identifierRoutes: OpenAPIHono<{
|
|
|
30
30
|
} & {
|
|
31
31
|
form: {
|
|
32
32
|
username: string;
|
|
33
|
-
login_selection?: "
|
|
33
|
+
login_selection?: "code" | "password" | 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?: "code" | "password" | undefined;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
output: {};
|
|
@@ -13,7 +13,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
|
|
|
13
13
|
};
|
|
14
14
|
output: {};
|
|
15
15
|
outputFormat: string;
|
|
16
|
-
status:
|
|
16
|
+
status: 200;
|
|
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:
|
|
25
|
+
status: 400;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
} & {
|
|
@@ -126,7 +126,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
126
126
|
};
|
|
127
127
|
output: {};
|
|
128
128
|
outputFormat: string;
|
|
129
|
-
status:
|
|
129
|
+
status: 200;
|
|
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:
|
|
138
|
+
status: 400;
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
141
|
} & {
|
|
@@ -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?: "code" | "password" | 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?: "code" | "password" | undefined;
|
|
533
533
|
};
|
|
534
534
|
};
|
|
535
535
|
output: {};
|
|
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
165
165
|
$get: {
|
|
166
166
|
input: {
|
|
167
167
|
param: {
|
|
168
|
-
screen: "
|
|
168
|
+
screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "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: "
|
|
184
|
+
screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "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: "
|
|
200
|
+
screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "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: "impersonate" | "
|
|
220
|
+
screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "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: "impersonate" | "
|
|
238
|
+
screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "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: "
|
|
173
|
+
screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "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: "
|
|
189
|
+
screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "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: "
|
|
205
|
+
screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "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: "impersonate" | "
|
|
225
|
+
screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "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: "impersonate" | "
|
|
243
|
+
screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "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,14 +1,32 @@
|
|
|
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
|
+
export interface MfaRequiredByAction {
|
|
5
|
+
/** The provider the (last enabling) action passed, e.g. "any". */
|
|
6
|
+
provider: string;
|
|
7
|
+
/** Recorded for remember-browser support; not acted on yet. */
|
|
8
|
+
allow_remember_browser: boolean;
|
|
9
|
+
}
|
|
4
10
|
/** Persisted context, grouped by responsibility in types, flat on disk. */
|
|
5
11
|
export interface LoginSessionData {
|
|
6
12
|
passwordReset?: PasswordResetFlow;
|
|
7
13
|
mfa_verified?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Set when a post-login action called `api.multifactor.enable(...)`. Forces
|
|
16
|
+
* MFA regardless of the tenant policy, and marks that post-login hooks have
|
|
17
|
+
* already run for this login so the resume after MFA does not run them again.
|
|
18
|
+
*/
|
|
19
|
+
mfa_required_by_action?: MfaRequiredByAction;
|
|
20
|
+
/** Authentication method type that satisfied MFA (e.g. "totp", "phone") */
|
|
21
|
+
mfa_method?: string;
|
|
22
|
+
/** When MFA was verified (ISO 8601); copied onto the browser session */
|
|
23
|
+
mfa_verified_at?: string;
|
|
8
24
|
authenticationMethodId?: string;
|
|
9
25
|
phoneNumber?: string;
|
|
10
26
|
totpSecret?: string;
|
|
11
27
|
guardian_enrollment?: boolean;
|
|
28
|
+
mfa_failed_attempts?: number;
|
|
29
|
+
mfa_sms_sent?: number;
|
|
12
30
|
pending_email_verification?: unknown;
|
|
13
31
|
hookId?: string;
|
|
14
32
|
form_values?: Record<string, unknown>;
|
|
@@ -211,7 +229,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
|
|
|
211
229
|
}, {
|
|
212
230
|
type: "passwordResetRequested";
|
|
213
231
|
params: unknown;
|
|
214
|
-
}, never, "
|
|
232
|
+
}, 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, {
|
|
215
233
|
id: "loginSession";
|
|
216
234
|
states: {
|
|
217
235
|
readonly pending: {};
|
|
@@ -121,6 +121,15 @@ export interface ManagementApiExtension {
|
|
|
121
121
|
* (e.g., from multi-tenancy package).
|
|
122
122
|
*/
|
|
123
123
|
router: OpenAPIHono<any, any, any>;
|
|
124
|
+
/**
|
|
125
|
+
* Set when the routes act on the control plane's own records (for example
|
|
126
|
+
* the tenant records `@authhero/multi-tenancy` mounts at `/tenants`). With
|
|
127
|
+
* `tenantDispatch`, a request for a tenant that runs in its own worker would
|
|
128
|
+
* otherwise be forwarded there, where those records do not exist. Requests
|
|
129
|
+
* to these routes are served here instead. `/tenants/settings` is the one
|
|
130
|
+
* exception: it is the tenant's own and still goes to its worker.
|
|
131
|
+
*/
|
|
132
|
+
controlPlane?: boolean;
|
|
124
133
|
}
|
|
125
134
|
/**
|
|
126
135
|
* Enqueues a durable tenant lifecycle operation (issue #1026): creates
|
|
@@ -186,6 +186,16 @@ export type OnExecutePostLoginAPI = {
|
|
|
186
186
|
prompt: {
|
|
187
187
|
render: (formId: string) => void;
|
|
188
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* Require MFA for this login (Auth0's `api.multifactor`). Any provider other
|
|
191
|
+
* than `"none"` requires MFA with any factor the tenant has enabled;
|
|
192
|
+
* `"none"` never removes MFA required by the tenant policy or another action.
|
|
193
|
+
*/
|
|
194
|
+
multifactor: {
|
|
195
|
+
enable: (provider: string, options?: {
|
|
196
|
+
allowRememberBrowser?: boolean;
|
|
197
|
+
}) => void;
|
|
198
|
+
};
|
|
189
199
|
redirect: {
|
|
190
200
|
sendUserTo: (url: string, options?: {
|
|
191
201
|
query?: Record<string, string>;
|
|
@@ -4,7 +4,12 @@ export declare function generateTOTP(secret: Uint8Array): Promise<string>;
|
|
|
4
4
|
* Verify a code against the current period ±1 (RFC 6238 §6 recommends
|
|
5
5
|
* tolerating one step of transmission delay / clock drift, and oslo's
|
|
6
6
|
* current-slice-only check made codes fail at period boundaries).
|
|
7
|
+
*
|
|
8
|
+
* Returns the matched time step (counter), or null if the code does not
|
|
9
|
+
* match. Callers must record the step with
|
|
10
|
+
* `authenticationMethods.consumeTotpStep` and reject the code if that fails,
|
|
11
|
+
* so an accepted code cannot be replayed within its window (RFC 6238 §5.2).
|
|
7
12
|
*/
|
|
8
|
-
export declare function verifyTOTP(code: string, secret: Uint8Array): Promise<
|
|
13
|
+
export declare function verifyTOTP(code: string, secret: Uint8Array): Promise<number | null>;
|
|
9
14
|
/** otpauth:// URI for enrolling the secret in an authenticator app. */
|
|
10
15
|
export declare function createTOTPKeyURI(issuer: string, accountName: string, secret: Uint8Array): string;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/sesamyab/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "9.
|
|
14
|
+
"version": "9.29.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"vite": "^8.0.14",
|
|
64
64
|
"vite-plugin-dts": "^4.5.4",
|
|
65
65
|
"vitest": "^4.1.7",
|
|
66
|
-
"@authhero/kysely-adapter": "12.
|
|
67
|
-
"@authhero/widget": "0.41.
|
|
66
|
+
"@authhero/kysely-adapter": "12.19.0",
|
|
67
|
+
"@authhero/widget": "0.41.10"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@peculiar/x509": "^1.14.3",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"qrcode": "^1.5.4",
|
|
82
82
|
"sanitize-html": "^2.17.4",
|
|
83
83
|
"xstate": "^5.31.1",
|
|
84
|
-
"@authhero/
|
|
85
|
-
"@authhero/
|
|
86
|
-
"@authhero/
|
|
84
|
+
"@authhero/adapter-interfaces": "4.26.0",
|
|
85
|
+
"@authhero/proxy": "0.11.13",
|
|
86
|
+
"@authhero/saml": "0.6.6"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@authhero/widget": ">=0.38.9",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require("./authhero.cjs");var e=[`passkey`,`webauthn-roaming`,`webauthn-platform`],t=30;async function n(n,r,i,a){if(!a)return{show:!1};let{connections:o}=await n.env.data.connections.list(r),s=o.find(e=>e.name===a)??o.find(e=>e.name.toLowerCase()===a.toLowerCase());if(!s?.options||!s.options.passkey_options?.progressive_enrollment_enabled||!s.options.authentication_methods?.passkey?.enabled||(await n.env.data.authenticationMethods.list(r,i)).some(t=>t.confirmed&&e.includes(t.type)))return{show:!1};let c=await n.env.data.users.get(r,i);if(!c)return{show:!1};let l=c.app_metadata||{};if(l.passkey_enrollment_opted_out===!0)return{show:!1};if(typeof l.passkey_enrollment_snoozed_at==`string`){let e=new Date(l.passkey_enrollment_snoozed_at),n=new Date(e.getTime()+t*24*60*60*1e3);if(new Date<n)return{show:!1}}return{show:!0}}exports.checkPasskeyNudgeRequired=n;
|