authhero 9.38.0 → 9.40.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/README.md +13 -3
- package/dist/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/assets/u/widget/p-603aa8fa.entry.js +1 -0
- package/dist/assets/u/widget/p-d0eb5acc.entry.js +1 -0
- package/dist/authhero.cjs +175 -170
- package/dist/authhero.d.ts +381 -237
- package/dist/authhero.mjs +21363 -19930
- package/dist/mfa-BlaRHQgI.js +4 -0
- package/dist/mfa-Ddp9JT1l.mjs +406 -0
- package/dist/{mfa-attempts-BK-gWrgJ.mjs → mfa-attempts-YsmteBp0.mjs} +5188 -4601
- package/dist/mfa-attempts-bPJnyu2c.js +385 -0
- package/dist/{passkey-enrollment-CmKahPq7.js → passkey-enrollment-CLg7RteL.js} +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +4 -1
- package/dist/types/authentication-flows/mfa.d.ts +3 -1
- package/dist/types/authentication-flows/passwordless.d.ts +2 -2
- package/dist/types/emails/index.d.ts +33 -1
- package/dist/types/generated/locale-types.d.ts +39 -0
- package/dist/types/helpers/client.d.ts +1 -0
- package/dist/types/helpers/code-recipient.d.ts +37 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/response-type-grants.d.ts +8 -0
- package/dist/types/hooks/custom-notification-provider.d.ts +174 -0
- package/dist/types/hooks/helpers/action-users.d.ts +56 -0
- package/dist/types/hooks/helpers/post-login-account-linking.d.ts +18 -4
- package/dist/types/hooks/lifecycle-codehooks.d.ts +1 -1
- package/dist/types/hooks/pre-screen.d.ts +114 -0
- package/dist/types/index.d.ts +295 -217
- package/dist/types/routes/auth-api/device.d.ts +8 -8
- package/dist/types/routes/auth-api/index.d.ts +18 -18
- package/dist/types/routes/auth-api/passwordless.d.ts +12 -12
- package/dist/types/routes/auth-api/token.d.ts +10 -10
- package/dist/types/routes/management-api/action-executions.d.ts +2 -2
- package/dist/types/routes/management-api/action-triggers.d.ts +25 -25
- package/dist/types/routes/management-api/actions.d.ts +9 -9
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/branding.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +2 -0
- package/dist/types/routes/management-api/connections.d.ts +7 -1
- package/dist/types/routes/management-api/email-templates.d.ts +20 -20
- package/dist/types/routes/management-api/emails.d.ts +2 -2
- package/dist/types/routes/management-api/failed-events.d.ts +2 -2
- package/dist/types/routes/management-api/forms.d.ts +168 -144
- 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 +25 -25
- package/dist/types/routes/management-api/index.d.ts +222 -190
- package/dist/types/routes/management-api/keys.d.ts +8 -8
- package/dist/types/routes/management-api/log-streams.d.ts +12 -12
- 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/roles.d.ts +1 -1
- package/dist/types/routes/management-api/self-service-profiles.d.ts +8 -8
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +29 -29
- package/dist/types/routes/management-api/users.d.ts +29 -29
- package/dist/types/routes/universal-login/continue.d.ts +35 -0
- package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
- package/dist/types/routes/universal-login/form-node.d.ts +4 -4
- package/dist/types/routes/universal-login/index.d.ts +4 -4
- package/dist/types/routes/universal-login/pre-screen-gates.d.ts +31 -0
- package/dist/types/routes/universal-login/screens/account-change-email.d.ts +52 -0
- package/dist/types/routes/universal-login/screens/account-helpers.d.ts +19 -24
- package/dist/types/routes/universal-login/screens/account.d.ts +6 -0
- package/dist/types/routes/universal-login/screens/connect-authz.d.ts +13 -1
- package/dist/types/routes/universal-login/screens/index.d.ts +4 -2
- package/dist/types/routes/universal-login/screens/invalid-session.d.ts +10 -0
- package/dist/types/routes/universal-login/screens/login-otp.d.ts +2 -2
- package/dist/types/routes/universal-login/screens/signup.d.ts +0 -3
- package/dist/types/routes/universal-login/screens/social-connections.d.ts +31 -0
- package/dist/types/routes/universal-login/screens/types.d.ts +3 -0
- package/dist/types/routes/universal-login/u2-form-node.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +50 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-widget-page.d.ts +1 -4
- package/dist/types/routes/universal-login/widget-assets.d.ts +20 -0
- package/dist/types/state-machines/login-session.d.ts +12 -0
- package/dist/types/types/AuthHeroConfig.d.ts +9 -1
- package/dist/types/types/Hooks.d.ts +62 -17
- package/dist/types/utils/embedded-browser.d.ts +4 -0
- package/package.json +6 -6
- package/dist/assets/u/widget/p-32247347.entry.js +0 -1
- package/dist/assets/u/widget/p-3f908508.entry.js +0 -1
- package/dist/mfa-DBhvi2B5.js +0 -1
- package/dist/mfa-DnCary4g.mjs +0 -128
- package/dist/mfa-attempts-C5kobAHS.js +0 -275
|
@@ -890,11 +890,12 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
890
890
|
};
|
|
891
891
|
};
|
|
892
892
|
output: {
|
|
893
|
-
id: string;
|
|
894
|
-
client_id: string;
|
|
895
893
|
user_id: string;
|
|
894
|
+
id: string;
|
|
896
895
|
created_at: string;
|
|
896
|
+
client_id: string;
|
|
897
897
|
rotating: boolean;
|
|
898
|
+
login_id: string;
|
|
898
899
|
device: {
|
|
899
900
|
initial_user_agent: string;
|
|
900
901
|
initial_ip: string;
|
|
@@ -903,16 +904,10 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
903
904
|
last_ip: string;
|
|
904
905
|
last_asn: string;
|
|
905
906
|
};
|
|
906
|
-
login_id: string;
|
|
907
907
|
resource_servers: {
|
|
908
908
|
audience: string;
|
|
909
909
|
scopes: string;
|
|
910
910
|
}[];
|
|
911
|
-
session_transfer?: {
|
|
912
|
-
client_id: string;
|
|
913
|
-
family_id: string;
|
|
914
|
-
cascade_revocation: boolean;
|
|
915
|
-
} | undefined;
|
|
916
911
|
expires_at?: string | undefined;
|
|
917
912
|
session_id?: string | undefined;
|
|
918
913
|
auth_connection?: string | undefined;
|
|
@@ -920,6 +915,11 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
920
915
|
strategy: string;
|
|
921
916
|
strategy_type: string;
|
|
922
917
|
} | undefined;
|
|
918
|
+
session_transfer?: {
|
|
919
|
+
client_id: string;
|
|
920
|
+
family_id: string;
|
|
921
|
+
cascade_revocation: boolean;
|
|
922
|
+
} | undefined;
|
|
923
923
|
organization?: string | undefined;
|
|
924
924
|
revoked_at?: string | undefined;
|
|
925
925
|
idle_expires_at?: string | undefined;
|
|
@@ -929,11 +929,12 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
929
929
|
limit: number;
|
|
930
930
|
length: number;
|
|
931
931
|
tokens: {
|
|
932
|
-
id: string;
|
|
933
|
-
client_id: string;
|
|
934
932
|
user_id: string;
|
|
933
|
+
id: string;
|
|
935
934
|
created_at: string;
|
|
935
|
+
client_id: string;
|
|
936
936
|
rotating: boolean;
|
|
937
|
+
login_id: string;
|
|
937
938
|
device: {
|
|
938
939
|
initial_user_agent: string;
|
|
939
940
|
initial_ip: string;
|
|
@@ -942,16 +943,10 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
942
943
|
last_ip: string;
|
|
943
944
|
last_asn: string;
|
|
944
945
|
};
|
|
945
|
-
login_id: string;
|
|
946
946
|
resource_servers: {
|
|
947
947
|
audience: string;
|
|
948
948
|
scopes: string;
|
|
949
949
|
}[];
|
|
950
|
-
session_transfer?: {
|
|
951
|
-
client_id: string;
|
|
952
|
-
family_id: string;
|
|
953
|
-
cascade_revocation: boolean;
|
|
954
|
-
} | undefined;
|
|
955
950
|
expires_at?: string | undefined;
|
|
956
951
|
session_id?: string | undefined;
|
|
957
952
|
auth_connection?: string | undefined;
|
|
@@ -959,6 +954,11 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
959
954
|
strategy: string;
|
|
960
955
|
strategy_type: string;
|
|
961
956
|
} | undefined;
|
|
957
|
+
session_transfer?: {
|
|
958
|
+
client_id: string;
|
|
959
|
+
family_id: string;
|
|
960
|
+
cascade_revocation: boolean;
|
|
961
|
+
} | undefined;
|
|
962
962
|
organization?: string | undefined;
|
|
963
963
|
revoked_at?: string | undefined;
|
|
964
964
|
idle_expires_at?: string | undefined;
|
|
@@ -968,11 +968,12 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
968
968
|
next?: string | undefined;
|
|
969
969
|
} | {
|
|
970
970
|
tokens: {
|
|
971
|
-
id: string;
|
|
972
|
-
client_id: string;
|
|
973
971
|
user_id: string;
|
|
972
|
+
id: string;
|
|
974
973
|
created_at: string;
|
|
974
|
+
client_id: string;
|
|
975
975
|
rotating: boolean;
|
|
976
|
+
login_id: string;
|
|
976
977
|
device: {
|
|
977
978
|
initial_user_agent: string;
|
|
978
979
|
initial_ip: string;
|
|
@@ -981,16 +982,10 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
981
982
|
last_ip: string;
|
|
982
983
|
last_asn: string;
|
|
983
984
|
};
|
|
984
|
-
login_id: string;
|
|
985
985
|
resource_servers: {
|
|
986
986
|
audience: string;
|
|
987
987
|
scopes: string;
|
|
988
988
|
}[];
|
|
989
|
-
session_transfer?: {
|
|
990
|
-
client_id: string;
|
|
991
|
-
family_id: string;
|
|
992
|
-
cascade_revocation: boolean;
|
|
993
|
-
} | undefined;
|
|
994
989
|
expires_at?: string | undefined;
|
|
995
990
|
session_id?: string | undefined;
|
|
996
991
|
auth_connection?: string | undefined;
|
|
@@ -998,6 +993,11 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
998
993
|
strategy: string;
|
|
999
994
|
strategy_type: string;
|
|
1000
995
|
} | undefined;
|
|
996
|
+
session_transfer?: {
|
|
997
|
+
client_id: string;
|
|
998
|
+
family_id: string;
|
|
999
|
+
cascade_revocation: boolean;
|
|
1000
|
+
} | undefined;
|
|
1001
1001
|
organization?: string | undefined;
|
|
1002
1002
|
revoked_at?: string | undefined;
|
|
1003
1003
|
idle_expires_at?: string | undefined;
|
|
@@ -1040,7 +1040,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
1040
1040
|
};
|
|
1041
1041
|
output: {};
|
|
1042
1042
|
outputFormat: string;
|
|
1043
|
-
status:
|
|
1043
|
+
status: 204;
|
|
1044
1044
|
} | {
|
|
1045
1045
|
input: {
|
|
1046
1046
|
param: {
|
|
@@ -1053,7 +1053,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
1053
1053
|
};
|
|
1054
1054
|
output: {};
|
|
1055
1055
|
outputFormat: string;
|
|
1056
|
-
status:
|
|
1056
|
+
status: 404;
|
|
1057
1057
|
};
|
|
1058
1058
|
};
|
|
1059
1059
|
} & {
|
|
@@ -1081,7 +1081,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
1081
1081
|
};
|
|
1082
1082
|
};
|
|
1083
1083
|
output: {
|
|
1084
|
-
type: "
|
|
1084
|
+
type: "cs" | "fi" | "sv" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "depnote" | "cfgdiff" | "cfgdrift" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
1085
1085
|
date: string;
|
|
1086
1086
|
isMobile: boolean;
|
|
1087
1087
|
log_id: string;
|
|
@@ -1117,7 +1117,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
1117
1117
|
} | undefined;
|
|
1118
1118
|
}[] | {
|
|
1119
1119
|
logs: {
|
|
1120
|
-
type: "
|
|
1120
|
+
type: "cs" | "fi" | "sv" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "depnote" | "cfgdiff" | "cfgdrift" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
1121
1121
|
date: string;
|
|
1122
1122
|
isMobile: boolean;
|
|
1123
1123
|
log_id: string;
|
|
@@ -1158,7 +1158,7 @@ export declare const userRoutes: OpenAPIHono<{
|
|
|
1158
1158
|
limit: number;
|
|
1159
1159
|
length: number;
|
|
1160
1160
|
logs: {
|
|
1161
|
-
type: "
|
|
1161
|
+
type: "cs" | "fi" | "sv" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "depnote" | "cfgdiff" | "cfgdrift" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
1162
1162
|
date: string;
|
|
1163
1163
|
isMobile: boolean;
|
|
1164
1164
|
log_id: string;
|
|
@@ -35,3 +35,38 @@ export declare const continueRoutes: OpenAPIHono<{
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
}, "/">;
|
|
38
|
+
export declare const u2ContinueRoutes: OpenAPIHono<{
|
|
39
|
+
Bindings: Bindings;
|
|
40
|
+
Variables: Variables;
|
|
41
|
+
}, {
|
|
42
|
+
"/": {
|
|
43
|
+
$get: {
|
|
44
|
+
input: {
|
|
45
|
+
query: {
|
|
46
|
+
state: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
output: {};
|
|
50
|
+
outputFormat: string;
|
|
51
|
+
status: 302;
|
|
52
|
+
} | {
|
|
53
|
+
input: {
|
|
54
|
+
query: {
|
|
55
|
+
state: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
output: {};
|
|
59
|
+
outputFormat: string;
|
|
60
|
+
status: 400;
|
|
61
|
+
} | {
|
|
62
|
+
input: {
|
|
63
|
+
query: {
|
|
64
|
+
state: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
output: {};
|
|
68
|
+
outputFormat: string;
|
|
69
|
+
status: 500;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, "/">;
|
|
@@ -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: "success" | "error" | "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: "success" | "error" | "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: "success" | "error" | "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: "success" | "error" | "info" | "warning";
|
|
135
135
|
id?: number | undefined;
|
|
136
136
|
}[] | undefined;
|
|
137
137
|
links?: {
|
|
@@ -173,7 +173,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
173
173
|
};
|
|
174
174
|
output: {};
|
|
175
175
|
outputFormat: string;
|
|
176
|
-
status:
|
|
176
|
+
status: 400;
|
|
177
177
|
} | {
|
|
178
178
|
input: {
|
|
179
179
|
query: {
|
|
@@ -188,7 +188,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
188
188
|
};
|
|
189
189
|
output: {};
|
|
190
190
|
outputFormat: string;
|
|
191
|
-
status:
|
|
191
|
+
status: 404;
|
|
192
192
|
} | {
|
|
193
193
|
input: {
|
|
194
194
|
query: {
|
|
@@ -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: "success" | "error" | "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: "success" | "error" | "info" | "warning";
|
|
232
232
|
id?: number | undefined;
|
|
233
233
|
}[] | undefined;
|
|
234
234
|
links?: {
|
|
@@ -282,7 +282,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
282
282
|
};
|
|
283
283
|
output: {};
|
|
284
284
|
outputFormat: string;
|
|
285
|
-
status:
|
|
285
|
+
status: 400;
|
|
286
286
|
} | {
|
|
287
287
|
input: {
|
|
288
288
|
param: {
|
|
@@ -300,7 +300,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
300
300
|
};
|
|
301
301
|
output: {};
|
|
302
302
|
outputFormat: string;
|
|
303
|
-
status:
|
|
303
|
+
status: 404;
|
|
304
304
|
} | {
|
|
305
305
|
input: {
|
|
306
306
|
param: {
|
|
@@ -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: "success" | "error" | "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: "success" | "error" | "info" | "warning";
|
|
347
347
|
id?: number | undefined;
|
|
348
348
|
}[] | undefined;
|
|
349
349
|
links?: {
|
|
@@ -18,7 +18,7 @@ export declare const formNodeRoutes: OpenAPIHono<{
|
|
|
18
18
|
};
|
|
19
19
|
output: {};
|
|
20
20
|
outputFormat: string;
|
|
21
|
-
status:
|
|
21
|
+
status: 200;
|
|
22
22
|
} | {
|
|
23
23
|
input: {
|
|
24
24
|
param: {
|
|
@@ -32,7 +32,7 @@ export declare const formNodeRoutes: OpenAPIHono<{
|
|
|
32
32
|
};
|
|
33
33
|
output: {};
|
|
34
34
|
outputFormat: string;
|
|
35
|
-
status:
|
|
35
|
+
status: 404;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
} & {
|
|
@@ -52,7 +52,7 @@ export declare const formNodeRoutes: OpenAPIHono<{
|
|
|
52
52
|
};
|
|
53
53
|
output: {};
|
|
54
54
|
outputFormat: string;
|
|
55
|
-
status:
|
|
55
|
+
status: 200;
|
|
56
56
|
} | {
|
|
57
57
|
input: {
|
|
58
58
|
param: {
|
|
@@ -68,7 +68,7 @@ export declare const formNodeRoutes: OpenAPIHono<{
|
|
|
68
68
|
};
|
|
69
69
|
output: {};
|
|
70
70
|
outputFormat: string;
|
|
71
|
-
status:
|
|
71
|
+
status: 404;
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
}, "/">;
|
|
@@ -63,7 +63,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
63
63
|
};
|
|
64
64
|
output: {};
|
|
65
65
|
outputFormat: string;
|
|
66
|
-
status:
|
|
66
|
+
status: 200;
|
|
67
67
|
} | {
|
|
68
68
|
input: {
|
|
69
69
|
param: {
|
|
@@ -77,7 +77,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
77
77
|
};
|
|
78
78
|
output: {};
|
|
79
79
|
outputFormat: string;
|
|
80
|
-
status:
|
|
80
|
+
status: 404;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
} & {
|
|
@@ -97,7 +97,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
97
97
|
};
|
|
98
98
|
output: {};
|
|
99
99
|
outputFormat: string;
|
|
100
|
-
status:
|
|
100
|
+
status: 200;
|
|
101
101
|
} | {
|
|
102
102
|
input: {
|
|
103
103
|
param: {
|
|
@@ -113,7 +113,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
113
113
|
};
|
|
114
114
|
output: {};
|
|
115
115
|
outputFormat: string;
|
|
116
|
-
status:
|
|
116
|
+
status: 404;
|
|
117
117
|
};
|
|
118
118
|
};
|
|
119
119
|
}, "/forms"> & import("hono/types").MergeSchemaPath<{
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wiring of the `pre-screen` trigger into universal login. Every u2 screen in
|
|
3
|
+
* the registry and the classic `/u` pages with the same screen fire it before
|
|
4
|
+
* the screen is shown (`render`) and when it is submitted (`submit`), so a
|
|
5
|
+
* direct POST can't skip a submit-time denial.
|
|
6
|
+
*/
|
|
7
|
+
import { MiddlewareHandler } from "hono";
|
|
8
|
+
import { Bindings, Variables } from "../../types";
|
|
9
|
+
import type { ScreenDefinition } from "./screens/types";
|
|
10
|
+
/** The pre-screen screen name of a u2 screen id, if it is gated. */
|
|
11
|
+
export declare function getPreScreenName(screenId: string): string | undefined;
|
|
12
|
+
/** u2 screen ids that fire `pre-screen`. */
|
|
13
|
+
export declare function listPreScreenScreenIds(): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Fire `pre-screen` for a u2 screen: `render` before its GET factory runs and
|
|
16
|
+
* `submit` before its POST handler. The screen a POST answers with (the next
|
|
17
|
+
* step, e.g. identifier → email code, or the same screen again) fires
|
|
18
|
+
* `render` too, since it is shown without a GET of its own.
|
|
19
|
+
*/
|
|
20
|
+
export declare function withPreScreen(screenId: string, definition: ScreenDefinition): ScreenDefinition;
|
|
21
|
+
/**
|
|
22
|
+
* Fire `pre-screen` for a classic `/u` page: `render` on GET and `submit` on
|
|
23
|
+
* POST, before the route handler. Requests without a login session (`state`)
|
|
24
|
+
* are left to the route, which rejects them.
|
|
25
|
+
*/
|
|
26
|
+
export declare function preScreenMiddleware(screenId: string, options?: {
|
|
27
|
+
submit?: boolean;
|
|
28
|
+
}): MiddlewareHandler<{
|
|
29
|
+
Bindings: Bindings;
|
|
30
|
+
Variables: Variables;
|
|
31
|
+
}>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Change email screens - the u2 equivalent of /u/account/change-email,
|
|
3
|
+
* /u/account/change-email-verify and /u/account/change-email-confirmation.
|
|
4
|
+
*
|
|
5
|
+
* 1. account-change-email: the user enters a new address and a one-time code
|
|
6
|
+
* is emailed to it.
|
|
7
|
+
* 2. account-change-email-verify: the user enters the code; the address is
|
|
8
|
+
* changed (and marked verified) on the user and its linked identities, and
|
|
9
|
+
* a confirmation with a continue link is shown.
|
|
10
|
+
*
|
|
11
|
+
* Both work from a signed-in session (`/u2/account`, `screen_hint=change-email`)
|
|
12
|
+
* and mid-login, when a form hook redirects to change-email: the login session
|
|
13
|
+
* then carries the `change-email` continuation scope and the user comes from
|
|
14
|
+
* it instead of a session cookie, as on /u.
|
|
15
|
+
*
|
|
16
|
+
* Unlike /u, the new address is stored with the code rather than passed in the
|
|
17
|
+
* URL, so the address that ends up on the account is the one the code was sent
|
|
18
|
+
* to. Whether an address is taken is only revealed after the code for it has
|
|
19
|
+
* been entered, i.e. to someone who controls that inbox.
|
|
20
|
+
*
|
|
21
|
+
* Corresponds to: /u2/account/change-email and /u2/account/change-email/verify
|
|
22
|
+
*/
|
|
23
|
+
import type { DataAdapters, LoginSession, Session, User } from "@authhero/adapter-interfaces";
|
|
24
|
+
import type { ScreenContext, ScreenDefinition, ScreenResult } from "./types";
|
|
25
|
+
/**
|
|
26
|
+
* Every user matching `q`, page by page. The offset listing returns linked
|
|
27
|
+
* identities as rows of their own, so a single page can be filled by the
|
|
28
|
+
* user's own identities and hide another owner.
|
|
29
|
+
*/
|
|
30
|
+
export declare function listAllUsers(users: DataAdapters["users"], tenantId: string, q: string, pageSize?: number): Promise<User[]>;
|
|
31
|
+
/** Whether a user outside this account (the user and its linked identities) has `email`. */
|
|
32
|
+
export declare function isEmailTakenOutsideAccount(users: DataAdapters["users"], tenantId: string, email: string, userId: string, pageSize?: number): Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* The user whose email is being changed. Mid-login (a form hook sent the user
|
|
35
|
+
* here, or to the account hub which links here) the login session's
|
|
36
|
+
* continuation scope authorizes the page and names the user; otherwise a
|
|
37
|
+
* signed-in session cookie is required.
|
|
38
|
+
*
|
|
39
|
+
* `continuationScope` is `change-email` when the hook targeted this page and
|
|
40
|
+
* `account` when the user came from the account hub mid-login.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveChangeEmailUser(context: ScreenContext): Promise<{
|
|
43
|
+
user: User;
|
|
44
|
+
session: Session | null;
|
|
45
|
+
loginSession: LoginSession;
|
|
46
|
+
isContinuation: boolean;
|
|
47
|
+
continuationScope?: string;
|
|
48
|
+
}>;
|
|
49
|
+
export declare function accountChangeEmailScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
50
|
+
export declare const accountChangeEmailScreenDefinition: ScreenDefinition;
|
|
51
|
+
export declare function accountChangeEmailVerifyScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
52
|
+
export declare const accountChangeEmailVerifyScreenDefinition: ScreenDefinition;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared helpers for account management screens
|
|
3
3
|
*/
|
|
4
|
-
import type { User, Session } from "@authhero/adapter-interfaces";
|
|
5
|
-
import type { ScreenContext
|
|
6
|
-
import type { AccountActionOperation } from "../../../types/Hooks";
|
|
4
|
+
import type { LoginSession, User, Session } from "@authhero/adapter-interfaces";
|
|
5
|
+
import type { ScreenContext } from "./types";
|
|
7
6
|
/**
|
|
8
7
|
* Resolve the authenticated user from the session cookie.
|
|
9
8
|
* Used by all account screens that need the current user.
|
|
@@ -13,27 +12,23 @@ export declare function resolveAccountUser(context: ScreenContext): Promise<{
|
|
|
13
12
|
session: Session;
|
|
14
13
|
}>;
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* Resolve the account user either mid-login or from a session cookie.
|
|
16
|
+
*
|
|
17
|
+
* When a form hook redirects to an account page mid-login, the login session
|
|
18
|
+
* is AWAITING_CONTINUATION with a scope naming that page (`account`,
|
|
19
|
+
* `change-email`). That scope authorizes the page and names the user, so no
|
|
20
|
+
* session cookie is needed. The first of `scopes` the login session carries is
|
|
21
|
+
* returned as `continuationScope`; without one, a signed-in session cookie is
|
|
22
|
+
* required as on every other account page.
|
|
19
23
|
*/
|
|
20
|
-
export declare function
|
|
21
|
-
user
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* screen. POST handlers that re-render the screen call the unwrapped factory.
|
|
27
|
-
*/
|
|
28
|
-
export declare function gatedScreen(operation: AccountActionOperation, factory: ScreenFactory, options?: {
|
|
29
|
-
details?: Record<string, string>;
|
|
30
|
-
user?: (context: ScreenContext) => Promise<User | undefined>;
|
|
31
|
-
}): ScreenFactory;
|
|
24
|
+
export declare function resolveAccountUserOrContinuation(context: ScreenContext, scopes: readonly string[]): Promise<{
|
|
25
|
+
user: User;
|
|
26
|
+
session: Session | null;
|
|
27
|
+
loginSession: LoginSession;
|
|
28
|
+
continuationScope?: string;
|
|
29
|
+
}>;
|
|
32
30
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* Where "continue" sends a user who reached an account page mid-login: the
|
|
32
|
+
* return URL stored when the continuation started (`/u2/continue?state=…`).
|
|
35
33
|
*/
|
|
36
|
-
export declare function
|
|
37
|
-
details?: Record<string, string>;
|
|
38
|
-
user?: (context: ScreenContext, data: Record<string, unknown>) => Promise<User | undefined>;
|
|
39
|
-
}): NonNullable<ScreenHandler["post"]>;
|
|
34
|
+
export declare function getContinuationReturnUrl(loginSession: LoginSession): string | undefined;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Account screen - main hub for account management
|
|
3
3
|
*
|
|
4
|
+
* Signed in (session cookie) it links to every account sub-screen. Mid-login,
|
|
5
|
+
* when a form hook redirects here, the login session carries the `account`
|
|
6
|
+
* continuation scope instead: the hub then shows the user, a change-email
|
|
7
|
+
* entry (the only sub-screen that accepts that scope) and a button that
|
|
8
|
+
* continues the login, matching what /u/account offered mid-login.
|
|
9
|
+
*
|
|
4
10
|
* Corresponds to: /u2/account
|
|
5
11
|
*/
|
|
6
12
|
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
@@ -14,6 +14,17 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type { ScreenContext } from "./types";
|
|
16
16
|
export declare const DCR_REGISTER_PERMISSION = "create:clients";
|
|
17
|
+
/**
|
|
18
|
+
* True when `tenantId` is the multi-tenancy control plane. Only there does
|
|
19
|
+
* the connect flow offer a workspace pick: the roles and organizations it
|
|
20
|
+
* checks for a pick are the control plane's, so on any other tenant they
|
|
21
|
+
* would be data that tenant's own admins control.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isControlPlaneTenant(data: {
|
|
24
|
+
multiTenancyConfig?: {
|
|
25
|
+
controlPlaneTenantId?: string;
|
|
26
|
+
};
|
|
27
|
+
}, tenantId: string): boolean;
|
|
17
28
|
/**
|
|
18
29
|
* Mirrors @authhero/multi-tenancy's escape hatch: a user holding
|
|
19
30
|
* `admin:organizations` on a global (non-org-scoped) role can act on any
|
|
@@ -61,6 +72,7 @@ export declare function userCanRegisterOnOrg(context: ScreenContext, userId: str
|
|
|
61
72
|
* - the user is a member of the control-plane org whose `name` equals the
|
|
62
73
|
* target tenant id AND holds `create:clients` on their role for that org.
|
|
63
74
|
*
|
|
64
|
-
*
|
|
75
|
+
* Only the control plane may pick a target, and the control plane itself is
|
|
76
|
+
* never a valid DCR target.
|
|
65
77
|
*/
|
|
66
78
|
export declare function userCanRegisterOnTenant(context: ScreenContext, userId: string, targetTenantId: string): Promise<boolean>;
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
* - forgot-password: /u/forgot-password
|
|
14
14
|
* - reset-password: /u/reset-password
|
|
15
15
|
* - impersonate: /u/impersonate
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
*
|
|
17
|
+
* /u/pre-signup and /u/pre-signup-sent have no u2 screen: u2 signup creates
|
|
18
|
+
* the account directly and verifies the address afterwards, and redeems the
|
|
19
|
+
* `code` of pre-signup emails sent from /u (see screens/signup.ts).
|
|
18
20
|
*/
|
|
19
21
|
export { identifierScreen } from "./identifier";
|
|
20
22
|
export { emailOtpChallengeScreen } from "./email-otp-challenge";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invalid session screen - a passwordless link was opened somewhere it can't
|
|
3
|
+
* complete (another browser or IP than the login started in, or the code had
|
|
4
|
+
* already been used or expired).
|
|
5
|
+
*
|
|
6
|
+
* Corresponds to: /u2/invalid-session (u2 equivalent of /u/invalid-session)
|
|
7
|
+
*/
|
|
8
|
+
import type { ScreenContext, ScreenResult, ScreenDefinition } from "./types";
|
|
9
|
+
export declare function invalidSessionScreen(context: ScreenContext): Promise<ScreenResult>;
|
|
10
|
+
export declare const invalidSessionScreenDefinition: ScreenDefinition;
|