authhero 9.19.0 → 9.21.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/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/p-dc0662ad.entry.js +1 -0
- package/dist/authhero.cjs +182 -170
- package/dist/authhero.d.ts +257 -127
- package/dist/authhero.mjs +18457 -15928
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/auth0-migration.d.ts +2 -2
- package/dist/types/authentication-flows/email-verification.d.ts +74 -0
- package/dist/types/authentication-flows/password.d.ts +3 -2
- package/dist/types/authentication-flows/passwordless.d.ts +3 -3
- package/dist/types/emails/index.d.ts +27 -1
- package/dist/types/generated/locale-types.d.ts +283 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/default-destinations.d.ts +7 -1
- package/dist/types/helpers/outbox-destinations/code-hooks.d.ts +5 -1
- package/dist/types/helpers/request-data.d.ts +24 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/run-outbox-relay.d.ts +7 -1
- package/dist/types/hooks/codehooks.d.ts +14 -1
- package/dist/types/index.d.ts +182 -124
- package/dist/types/routes/auth-api/account.d.ts +2 -2
- package/dist/types/routes/auth-api/index.d.ts +10 -10
- package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
- 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/management-api/action-executions.d.ts +2 -2
- package/dist/types/routes/management-api/action-triggers.d.ts +1 -1
- package/dist/types/routes/management-api/actions.d.ts +1 -1
- 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 +14 -14
- package/dist/types/routes/management-api/failed-events.d.ts +51 -1
- package/dist/types/routes/management-api/flows.d.ts +7 -7
- package/dist/types/routes/management-api/forms.d.ts +126 -126
- 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/index.d.ts +153 -95
- 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/organizations.d.ts +3 -3
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/roles.d.ts +11 -3
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +2 -2
- package/dist/types/routes/management-api/users.d.ts +11 -11
- package/dist/types/routes/universal-login/common.d.ts +8 -8
- package/dist/types/routes/universal-login/error-page.d.ts +9 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/sanitization-utils.d.ts +7 -0
- package/dist/types/routes/universal-login/screen-prompt-map.d.ts +2 -0
- package/dist/types/routes/universal-login/screens/email-verification.d.ts +29 -0
- package/dist/types/routes/universal-login/screens/handler-error.d.ts +11 -0
- package/dist/types/routes/universal-login/screens/reset-password.d.ts +5 -1
- package/dist/types/routes/universal-login/screens/signup.d.ts +6 -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/types/AuthError.d.ts +1 -1
- package/dist/types/types/AuthHeroConfig.d.ts +25 -0
- package/dist/types/types/Bindings.d.ts +8 -1
- package/dist/types/types/Variables.d.ts +26 -1
- package/package.json +6 -6
- package/dist/assets/u/widget/p-36898e2d.entry.js +0 -1
|
@@ -43,8 +43,8 @@ interface AttemptUpstreamPasswordParams {
|
|
|
43
43
|
* via the password-realm grant. On success, creates the local user (if
|
|
44
44
|
* missing), stores the bcrypt hash of the password locally, and returns the
|
|
45
45
|
* user. On any failure, returns null — the caller surfaces the existing
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* INVALID_CREDENTIALS error so the upstream's existence is not leaked to
|
|
47
|
+
* clients.
|
|
48
48
|
*
|
|
49
49
|
* Subsequent logins are served entirely locally because the password row now
|
|
50
50
|
* exists on our side.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
import { LoginSession, User } from "@authhero/adapter-interfaces";
|
|
3
|
+
import { Bindings, Variables } from "../types";
|
|
4
|
+
import { EnrichedClient } from "../helpers/client";
|
|
5
|
+
export type EmailVerificationMethod = "link" | "code";
|
|
6
|
+
/**
|
|
7
|
+
* How a login that is blocked on an unverified email (client
|
|
8
|
+
* `email_validation: "enforced"`) should verify it. UI flows pass this to
|
|
9
|
+
* `passwordGrant`; without it the grant falls back to emailing a link and
|
|
10
|
+
* failing the login session (token endpoint, legacy /u routes).
|
|
11
|
+
*/
|
|
12
|
+
export interface LoginEmailVerification {
|
|
13
|
+
method: EmailVerificationMethod;
|
|
14
|
+
/** Link method only: where the emailed link returns the user. */
|
|
15
|
+
resultUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PendingLoginEmailVerification {
|
|
18
|
+
/** The password-validated identity whose email must be verified. */
|
|
19
|
+
user_id: string;
|
|
20
|
+
/** The connection the password login targeted. */
|
|
21
|
+
connection: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The pending verification of a still-pending login session, or undefined
|
|
25
|
+
* when no password has been validated for it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPendingLoginEmailVerification(loginSession: LoginSession): PendingLoginEmailVerification | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Record (or with `undefined`, clear) the pending verification on the login
|
|
30
|
+
* session. Re-reads the session so other `state_data` keys aren't clobbered.
|
|
31
|
+
*/
|
|
32
|
+
export declare function setPendingLoginEmailVerification(ctx: Context<{
|
|
33
|
+
Bindings: Bindings;
|
|
34
|
+
Variables: Variables;
|
|
35
|
+
}>, tenantId: string, loginSessionId: string, pending: PendingLoginEmailVerification | undefined): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* The database connection's `attributes.email.verification_method`. Defaults
|
|
38
|
+
* to "code" like the u2 password reset, so the user stays on the login page
|
|
39
|
+
* instead of depending on an emailed link.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getEmailVerificationMethod(client: EnrichedClient): EmailVerificationMethod;
|
|
42
|
+
/**
|
|
43
|
+
* Mint a one-time code bound to the login session and email it. The code is
|
|
44
|
+
* only issued after the password has been validated, so redeeming it proves
|
|
45
|
+
* both factors and lets the same login session complete.
|
|
46
|
+
*/
|
|
47
|
+
export declare function sendLoginEmailVerificationCode(ctx: Context<{
|
|
48
|
+
Bindings: Bindings;
|
|
49
|
+
Variables: Variables;
|
|
50
|
+
}>, params: {
|
|
51
|
+
client: EnrichedClient;
|
|
52
|
+
user: User;
|
|
53
|
+
loginSession: LoginSession;
|
|
54
|
+
connection: string;
|
|
55
|
+
language?: string;
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
export type VerifyLoginEmailCodeResult = {
|
|
58
|
+
ok: true;
|
|
59
|
+
/** The primary user to complete the login as. */
|
|
60
|
+
user: User;
|
|
61
|
+
/** The connection the password login targeted. */
|
|
62
|
+
connection: string;
|
|
63
|
+
} | {
|
|
64
|
+
ok: false;
|
|
65
|
+
reason: "invalid" | "rate_limited";
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Redeem a login email-verification code: marks the verified identity's
|
|
69
|
+
* email as verified and returns the user to complete the login with.
|
|
70
|
+
*/
|
|
71
|
+
export declare function verifyLoginEmailCode(ctx: Context<{
|
|
72
|
+
Bindings: Bindings;
|
|
73
|
+
Variables: Variables;
|
|
74
|
+
}>, client: EnrichedClient, loginSession: LoginSession, code: string): Promise<VerifyLoginEmailCodeResult>;
|
|
@@ -2,6 +2,7 @@ import { Context } from "hono";
|
|
|
2
2
|
import { AuthParams, LoginSession, User } from "@authhero/adapter-interfaces";
|
|
3
3
|
import { EnrichedClient } from "../helpers/client";
|
|
4
4
|
import { Bindings, GrantFlowUserResult, Variables } from "../types";
|
|
5
|
+
import { LoginEmailVerification } from "./email-verification";
|
|
5
6
|
/**
|
|
6
7
|
* Clear the failed-login counter for a user. Failed logins are always
|
|
7
8
|
* recorded on the primary account (see {@link recordFailedLogin}), so this
|
|
@@ -23,13 +24,13 @@ export declare function passwordGrant(ctx: Context<{
|
|
|
23
24
|
Variables: Variables;
|
|
24
25
|
}>, client: EnrichedClient, authParams: AuthParams & {
|
|
25
26
|
password: string;
|
|
26
|
-
}, loginSession?: LoginSession, realm?: string): Promise<GrantFlowUserResult>;
|
|
27
|
+
}, loginSession?: LoginSession, realm?: string, emailVerification?: LoginEmailVerification): Promise<GrantFlowUserResult>;
|
|
27
28
|
export declare function loginWithPassword(ctx: Context<{
|
|
28
29
|
Bindings: Bindings;
|
|
29
30
|
Variables: Variables;
|
|
30
31
|
}>, client: EnrichedClient, authParams: AuthParams & {
|
|
31
32
|
password: string;
|
|
32
|
-
}, loginSession?: LoginSession, ticketAuth?: boolean, realm?: string): Promise<Response>;
|
|
33
|
+
}, loginSession?: LoginSession, ticketAuth?: boolean, realm?: string, emailVerification?: LoginEmailVerification): Promise<Response>;
|
|
33
34
|
export declare function changePassword(ctx: Context<{
|
|
34
35
|
Bindings: Bindings;
|
|
35
36
|
Variables: Variables;
|
|
@@ -475,7 +475,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
475
475
|
custom_login_page_preview?: string | undefined;
|
|
476
476
|
form_template?: string | undefined;
|
|
477
477
|
addons?: Record<string, any> | undefined;
|
|
478
|
-
token_endpoint_auth_method?: "
|
|
478
|
+
token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
|
|
479
479
|
client_metadata?: Record<string, string> | undefined;
|
|
480
480
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
481
481
|
mobile?: Record<string, any> | undefined;
|
|
@@ -561,8 +561,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
561
561
|
} | undefined;
|
|
562
562
|
authenticated_at?: string | undefined;
|
|
563
563
|
};
|
|
564
|
-
connectionType: "
|
|
565
|
-
authConnection: "
|
|
564
|
+
connectionType: "email" | "username" | "sms";
|
|
565
|
+
authConnection: "email" | "username" | "sms";
|
|
566
566
|
session_id: string | undefined;
|
|
567
567
|
authParams: {
|
|
568
568
|
audience?: string | undefined;
|
|
@@ -45,10 +45,36 @@ export declare function sendLink(ctx: Context<{
|
|
|
45
45
|
Bindings: Bindings;
|
|
46
46
|
Variables: Variables;
|
|
47
47
|
}>, { to, code, authParams, language }: SendLinkParams): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Where the verification landing page's "Continue" button should lead. Stored
|
|
50
|
+
* on the ticket so the page can send the user back to the app that triggered
|
|
51
|
+
* the email — it never resumes the original login session.
|
|
52
|
+
*/
|
|
53
|
+
export type EmailVerificationReturnTo = {
|
|
54
|
+
client_id?: string;
|
|
55
|
+
redirect_uri?: string;
|
|
56
|
+
};
|
|
57
|
+
export interface SendValidateEmailAddressOptions extends EmailVerificationReturnTo {
|
|
58
|
+
/**
|
|
59
|
+
* Where the ticket endpoint redirects after verifying. Set by the login
|
|
60
|
+
* flow so the link lands the user back on the login screen of the session
|
|
61
|
+
* that asked for verification instead of the landing page.
|
|
62
|
+
*/
|
|
63
|
+
resultUrl?: string;
|
|
64
|
+
}
|
|
48
65
|
export declare function sendValidateEmailAddress(ctx: Context<{
|
|
49
66
|
Bindings: Bindings;
|
|
50
67
|
Variables: Variables;
|
|
51
|
-
}>, user: User, language?: string): Promise<void>;
|
|
68
|
+
}>, user: User, language?: string, { resultUrl, client_id, redirect_uri }?: SendValidateEmailAddressOptions): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Email a one-time code that verifies the user's email address. Used by the
|
|
71
|
+
* login flow when the database connection's `verification_method` is "code";
|
|
72
|
+
* the code is entered on the u2 email-verification screen.
|
|
73
|
+
*/
|
|
74
|
+
export declare function sendEmailVerificationCode(ctx: Context<{
|
|
75
|
+
Bindings: Bindings;
|
|
76
|
+
Variables: Variables;
|
|
77
|
+
}>, user: User, code: string, language?: string): Promise<void>;
|
|
52
78
|
export declare function sendSignupValidateEmailAddress(ctx: Context<{
|
|
53
79
|
Bindings: Bindings;
|
|
54
80
|
Variables: Variables;
|
|
@@ -2,6 +2,7 @@ export type Locale = "cs" | "da" | "en" | "fi" | "it" | "nb" | "pl" | "sv";
|
|
|
2
2
|
export interface CommonScreen {
|
|
3
3
|
alertListTitle: () => string;
|
|
4
4
|
backText: () => string;
|
|
5
|
+
backToLoginText: () => string;
|
|
5
6
|
cancelText: () => string;
|
|
6
7
|
closeText: () => string;
|
|
7
8
|
contactSupportText: () => string;
|
|
@@ -20,6 +21,162 @@ export interface CommonScreen {
|
|
|
20
21
|
termsShortText: () => string;
|
|
21
22
|
tryAgainText: () => string;
|
|
22
23
|
}
|
|
24
|
+
export interface CommonAccountScreen {
|
|
25
|
+
title: () => string;
|
|
26
|
+
description: () => string;
|
|
27
|
+
editProfileLabel: () => string;
|
|
28
|
+
editProfileDetail: () => string;
|
|
29
|
+
securityLabel: () => string;
|
|
30
|
+
securityDetail: () => string;
|
|
31
|
+
securityMethodsCountOne: (vars: {
|
|
32
|
+
count: string;
|
|
33
|
+
}) => string;
|
|
34
|
+
securityMethodsCount: (vars: {
|
|
35
|
+
count: string;
|
|
36
|
+
}) => string;
|
|
37
|
+
passkeysLabel: () => string;
|
|
38
|
+
passkeysDetail: () => string;
|
|
39
|
+
passkeysCountOne: (vars: {
|
|
40
|
+
count: string;
|
|
41
|
+
}) => string;
|
|
42
|
+
passkeysCount: (vars: {
|
|
43
|
+
count: string;
|
|
44
|
+
}) => string;
|
|
45
|
+
linkedAccountsLabel: () => string;
|
|
46
|
+
linkedAccountsDetail: () => string;
|
|
47
|
+
linkedAccountsCountOne: (vars: {
|
|
48
|
+
count: string;
|
|
49
|
+
}) => string;
|
|
50
|
+
linkedAccountsCount: (vars: {
|
|
51
|
+
count: string;
|
|
52
|
+
}) => string;
|
|
53
|
+
deleteAccountLabel: () => string;
|
|
54
|
+
deleteAccountDetail: () => string;
|
|
55
|
+
logoutText: () => string;
|
|
56
|
+
}
|
|
57
|
+
export interface CommonAccountProfileScreen {
|
|
58
|
+
title: () => string;
|
|
59
|
+
description: () => string;
|
|
60
|
+
givenNameLabel: () => string;
|
|
61
|
+
familyNameLabel: () => string;
|
|
62
|
+
nicknameLabel: () => string;
|
|
63
|
+
phoneNumberLabel: () => string;
|
|
64
|
+
pictureLabel: () => string;
|
|
65
|
+
buttonText: () => string;
|
|
66
|
+
backToAccountText: () => string;
|
|
67
|
+
updateFailed: () => string;
|
|
68
|
+
}
|
|
69
|
+
export interface CommonAccountDeleteScreen {
|
|
70
|
+
title: () => string;
|
|
71
|
+
description: () => string;
|
|
72
|
+
warningTitle: () => string;
|
|
73
|
+
warningText: () => string;
|
|
74
|
+
confirmationLabel: (vars: {
|
|
75
|
+
confirmationWord: string;
|
|
76
|
+
}) => string;
|
|
77
|
+
buttonText: () => string;
|
|
78
|
+
cancelText: () => string;
|
|
79
|
+
confirmationError: (vars: {
|
|
80
|
+
confirmationWord: string;
|
|
81
|
+
}) => string;
|
|
82
|
+
deleteSuccess: () => string;
|
|
83
|
+
deleteFailed: () => string;
|
|
84
|
+
}
|
|
85
|
+
export interface CommonAccountLinkedScreen {
|
|
86
|
+
title: () => string;
|
|
87
|
+
description: () => string;
|
|
88
|
+
noLinkedAccounts: () => string;
|
|
89
|
+
unlinkButtonText: () => string;
|
|
90
|
+
backToAccountText: () => string;
|
|
91
|
+
unlinkSuccess: () => string;
|
|
92
|
+
unlinkFailed: () => string;
|
|
93
|
+
}
|
|
94
|
+
export interface CommonAccountSecurityScreen {
|
|
95
|
+
title: () => string;
|
|
96
|
+
description: () => string;
|
|
97
|
+
noEnrollments: () => string;
|
|
98
|
+
addedOn: (vars: {
|
|
99
|
+
date: string;
|
|
100
|
+
}) => string;
|
|
101
|
+
removeButtonText: () => string;
|
|
102
|
+
addTotpLabel: () => string;
|
|
103
|
+
addTotpDetail: () => string;
|
|
104
|
+
addSmsLabel: () => string;
|
|
105
|
+
addSmsDetail: () => string;
|
|
106
|
+
typeTotp: () => string;
|
|
107
|
+
typePhone: () => string;
|
|
108
|
+
typeEmail: () => string;
|
|
109
|
+
typePush: () => string;
|
|
110
|
+
typeWebauthn: () => string;
|
|
111
|
+
backToAccountText: () => string;
|
|
112
|
+
enrollmentNotFound: () => string;
|
|
113
|
+
removeSuccess: () => string;
|
|
114
|
+
removeFailed: () => string;
|
|
115
|
+
}
|
|
116
|
+
export interface CommonAccountPasskeysScreen {
|
|
117
|
+
title: () => string;
|
|
118
|
+
description: () => string;
|
|
119
|
+
noPasskeysText: () => string;
|
|
120
|
+
defaultPasskeyName: () => string;
|
|
121
|
+
syncedBadgeText: () => string;
|
|
122
|
+
addedOnText: (vars: {
|
|
123
|
+
date: string;
|
|
124
|
+
}) => string;
|
|
125
|
+
renameButtonText: () => string;
|
|
126
|
+
removeButtonText: () => string;
|
|
127
|
+
renamePromptText: () => string;
|
|
128
|
+
addPasskeyButtonText: () => string;
|
|
129
|
+
backToAccountText: () => string;
|
|
130
|
+
logoutText: () => string;
|
|
131
|
+
passkeyNotFoundText: () => string;
|
|
132
|
+
passkeyRemovedText: () => string;
|
|
133
|
+
removeFailedText: () => string;
|
|
134
|
+
invalidNameText: () => string;
|
|
135
|
+
passkeyRenamedText: () => string;
|
|
136
|
+
renameFailedText: () => string;
|
|
137
|
+
startRegistrationFailedText: () => string;
|
|
138
|
+
missingCredentialText: () => string;
|
|
139
|
+
challengeExpiredText: () => string;
|
|
140
|
+
invalidCredentialText: () => string;
|
|
141
|
+
verificationFailedText: () => string;
|
|
142
|
+
passkeyAddedText: () => string;
|
|
143
|
+
registrationFailedText: () => string;
|
|
144
|
+
}
|
|
145
|
+
export interface CommonAccountMfaPhoneEnrollmentScreen {
|
|
146
|
+
title: () => string;
|
|
147
|
+
description: () => string;
|
|
148
|
+
phoneLabel: () => string;
|
|
149
|
+
sendCodeButtonText: () => string;
|
|
150
|
+
backToSecurityText: () => string;
|
|
151
|
+
verifyTitle: () => string;
|
|
152
|
+
verifyDescription: () => string;
|
|
153
|
+
codeSentText: (vars: {
|
|
154
|
+
phoneNumber: string;
|
|
155
|
+
}) => string;
|
|
156
|
+
codeSentToYourPhoneText: () => string;
|
|
157
|
+
codeLabel: () => string;
|
|
158
|
+
codePlaceholder: () => string;
|
|
159
|
+
verifyButtonText: () => string;
|
|
160
|
+
noPhoneText: () => string;
|
|
161
|
+
invalidPhoneText: () => string;
|
|
162
|
+
sendCodeFailedText: () => string;
|
|
163
|
+
noCodeText: () => string;
|
|
164
|
+
invalidCodeText: () => string;
|
|
165
|
+
sessionInvalidText: () => string;
|
|
166
|
+
}
|
|
167
|
+
export interface CommonAccountMfaTotpEnrollmentScreen {
|
|
168
|
+
title: () => string;
|
|
169
|
+
description: () => string;
|
|
170
|
+
qrCodeAltText: () => string;
|
|
171
|
+
manualKeyText: () => string;
|
|
172
|
+
codeLabel: () => string;
|
|
173
|
+
codePlaceholder: () => string;
|
|
174
|
+
verifyButtonText: () => string;
|
|
175
|
+
backToSecurityText: () => string;
|
|
176
|
+
noCodeText: () => string;
|
|
177
|
+
invalidCodeText: () => string;
|
|
178
|
+
verificationFailedText: () => string;
|
|
179
|
+
}
|
|
23
180
|
export interface ConsentScreen {
|
|
24
181
|
buttonText: () => string;
|
|
25
182
|
cancelButtonText: () => string;
|
|
@@ -35,6 +192,51 @@ export interface ConsentScreen {
|
|
|
35
192
|
title: (vars: {
|
|
36
193
|
clientName: string;
|
|
37
194
|
}) => string;
|
|
195
|
+
accessAccountText: (vars: {
|
|
196
|
+
tenantName: string;
|
|
197
|
+
userName: string;
|
|
198
|
+
}) => string;
|
|
199
|
+
notAuthenticated: () => string;
|
|
200
|
+
sessionExpired: () => string;
|
|
201
|
+
consentStorageNotConfigured: () => string;
|
|
202
|
+
}
|
|
203
|
+
export interface ConsentConnectConsentScreen {
|
|
204
|
+
title: () => string;
|
|
205
|
+
description: (vars: {
|
|
206
|
+
domain: string;
|
|
207
|
+
}) => string;
|
|
208
|
+
connectAccountText: (vars: {
|
|
209
|
+
tenantName: string;
|
|
210
|
+
userName: string;
|
|
211
|
+
}) => string;
|
|
212
|
+
workspaceLabel: () => string;
|
|
213
|
+
apiLabel: () => string;
|
|
214
|
+
permissionsLabel: () => string;
|
|
215
|
+
localDevBadge: () => string;
|
|
216
|
+
localDevTooltip: () => string;
|
|
217
|
+
buttonText: () => string;
|
|
218
|
+
cancelText: () => string;
|
|
219
|
+
notAuthenticated: () => string;
|
|
220
|
+
sessionExpired: () => string;
|
|
221
|
+
workspaceSelectionRequired: () => string;
|
|
222
|
+
noWorkspaceAccess: () => string;
|
|
223
|
+
workspaceNotFound: () => string;
|
|
224
|
+
}
|
|
225
|
+
export interface ConsentConnectTenantSelectScreen {
|
|
226
|
+
title: () => string;
|
|
227
|
+
description: (vars: {
|
|
228
|
+
domain: string;
|
|
229
|
+
tenantName: string;
|
|
230
|
+
}) => string;
|
|
231
|
+
noWorkspacesDescription: () => string;
|
|
232
|
+
noWorkspacesText: (vars: {
|
|
233
|
+
tenantName: string;
|
|
234
|
+
}) => string;
|
|
235
|
+
cancelText: () => string;
|
|
236
|
+
notAuthenticated: () => string;
|
|
237
|
+
sessionExpired: () => string;
|
|
238
|
+
noWorkspaceSelected: () => string;
|
|
239
|
+
noWorkspaceAccess: () => string;
|
|
38
240
|
}
|
|
39
241
|
export interface DeviceFlowScreen {
|
|
40
242
|
buttonText: () => string;
|
|
@@ -65,11 +267,17 @@ export interface EmailOtpChallengeScreen {
|
|
|
65
267
|
title: () => string;
|
|
66
268
|
unexpectedError: () => string;
|
|
67
269
|
usePasswordText: () => string;
|
|
270
|
+
tooManyRequests: () => string;
|
|
68
271
|
}
|
|
69
272
|
export interface EmailVerificationScreen {
|
|
70
273
|
description: (vars: {
|
|
71
274
|
email: string;
|
|
72
275
|
}) => string;
|
|
276
|
+
linkAlreadyUsed: () => string;
|
|
277
|
+
linkInvalid: () => string;
|
|
278
|
+
linkInvalidOrExpired: () => string;
|
|
279
|
+
linkInvalidTitle: () => string;
|
|
280
|
+
linkWrongType: () => string;
|
|
73
281
|
pageTitle: (vars: {
|
|
74
282
|
clientName: string;
|
|
75
283
|
}) => string;
|
|
@@ -78,6 +286,39 @@ export interface EmailVerificationScreen {
|
|
|
78
286
|
successTitle: () => string;
|
|
79
287
|
title: () => string;
|
|
80
288
|
}
|
|
289
|
+
export interface EmailVerificationEmailVerificationCodeScreen {
|
|
290
|
+
buttonText: () => string;
|
|
291
|
+
codeLabel: () => string;
|
|
292
|
+
codePlaceholder: () => string;
|
|
293
|
+
defaultDescription: () => string;
|
|
294
|
+
description: (vars: {
|
|
295
|
+
email: string;
|
|
296
|
+
}) => string;
|
|
297
|
+
invalidCode: () => string;
|
|
298
|
+
noCode: () => string;
|
|
299
|
+
pageTitle: (vars: {
|
|
300
|
+
clientName: string;
|
|
301
|
+
}) => string;
|
|
302
|
+
resendFailed: () => string;
|
|
303
|
+
resendSuccess: () => string;
|
|
304
|
+
resendText: () => string;
|
|
305
|
+
sessionExpired: () => string;
|
|
306
|
+
title: () => string;
|
|
307
|
+
tooManyAttempts: () => string;
|
|
308
|
+
}
|
|
309
|
+
export interface EmailVerificationEmailVerificationLinkSentScreen {
|
|
310
|
+
defaultDescription: () => string;
|
|
311
|
+
description: (vars: {
|
|
312
|
+
email: string;
|
|
313
|
+
}) => string;
|
|
314
|
+
pageTitle: (vars: {
|
|
315
|
+
clientName: string;
|
|
316
|
+
}) => string;
|
|
317
|
+
resendFailed: () => string;
|
|
318
|
+
resendSuccess: () => string;
|
|
319
|
+
resendText: () => string;
|
|
320
|
+
title: () => string;
|
|
321
|
+
}
|
|
81
322
|
export interface InvitationScreen {
|
|
82
323
|
acceptButtonText: () => string;
|
|
83
324
|
description: (vars: {
|
|
@@ -89,6 +330,8 @@ export interface InvitationScreen {
|
|
|
89
330
|
clientName: string;
|
|
90
331
|
}) => string;
|
|
91
332
|
title: () => string;
|
|
333
|
+
defaultOrganizationName: () => string;
|
|
334
|
+
acceptFailed: () => string;
|
|
92
335
|
}
|
|
93
336
|
export interface LoginScreen {
|
|
94
337
|
alertListTitle: () => string;
|
|
@@ -145,6 +388,9 @@ export interface LoginScreen {
|
|
|
145
388
|
}) => string;
|
|
146
389
|
passkeyButtonText: () => string;
|
|
147
390
|
wrongCredentials: () => string;
|
|
391
|
+
userBlocked: () => string;
|
|
392
|
+
tooManyRequests: () => string;
|
|
393
|
+
unexpectedError: () => string;
|
|
148
394
|
}
|
|
149
395
|
export interface LoginIdScreen {
|
|
150
396
|
alertListTitle: () => string;
|
|
@@ -272,6 +518,9 @@ export interface LoginPasswordScreen {
|
|
|
272
518
|
"user-blocked": () => string;
|
|
273
519
|
"wrong-credentials": () => string;
|
|
274
520
|
sendCodeText: () => string;
|
|
521
|
+
sessionExpired: () => string;
|
|
522
|
+
tooManyRequests: () => string;
|
|
523
|
+
unexpectedError: () => string;
|
|
275
524
|
}
|
|
276
525
|
export interface LoginPasswordlessScreen {
|
|
277
526
|
authMethodEmail: () => string;
|
|
@@ -345,6 +594,8 @@ export interface MfaOtpMfaTotpEnrollmentScreen {
|
|
|
345
594
|
clientName: string;
|
|
346
595
|
}) => string;
|
|
347
596
|
enrollmentComplete: () => string;
|
|
597
|
+
pickAuthenticatorText: () => string;
|
|
598
|
+
qrCodeAltText: () => string;
|
|
348
599
|
}
|
|
349
600
|
export interface MfaOtpMfaTotpChallengeScreen {
|
|
350
601
|
title: () => string;
|
|
@@ -494,6 +745,9 @@ export interface PasskeysPasskeyEnrollmentScreen {
|
|
|
494
745
|
pageTitle: (vars: {
|
|
495
746
|
clientName: string;
|
|
496
747
|
}) => string;
|
|
748
|
+
sessionExpired: () => string;
|
|
749
|
+
enrollmentRequired: () => string;
|
|
750
|
+
challengeExpired: () => string;
|
|
497
751
|
}
|
|
498
752
|
export interface PasskeysPasskeyChallengeScreen {
|
|
499
753
|
title: () => string;
|
|
@@ -504,6 +758,7 @@ export interface PasskeysPasskeyChallengeScreen {
|
|
|
504
758
|
pageTitle: (vars: {
|
|
505
759
|
clientName: string;
|
|
506
760
|
}) => string;
|
|
761
|
+
sessionExpired: () => string;
|
|
507
762
|
}
|
|
508
763
|
export interface OrganizationsScreen {
|
|
509
764
|
description: () => string;
|
|
@@ -535,6 +790,8 @@ export interface ResetPasswordScreen {
|
|
|
535
790
|
successTitle: () => string;
|
|
536
791
|
title: () => string;
|
|
537
792
|
"user-not-found": () => string;
|
|
793
|
+
noPassword: () => string;
|
|
794
|
+
sessionExpired: () => string;
|
|
538
795
|
}
|
|
539
796
|
export interface ResetPasswordResetPasswordCodeScreen {
|
|
540
797
|
backToLoginText: () => string;
|
|
@@ -562,6 +819,7 @@ export interface ResetPasswordResetPasswordCodeScreen {
|
|
|
562
819
|
resendText: () => string;
|
|
563
820
|
sessionExpired: () => string;
|
|
564
821
|
title: () => string;
|
|
822
|
+
noPassword: () => string;
|
|
565
823
|
}
|
|
566
824
|
export interface SignupScreen {
|
|
567
825
|
buttonText: () => string;
|
|
@@ -595,6 +853,8 @@ export interface SignupScreen {
|
|
|
595
853
|
"username-already-exists": () => string;
|
|
596
854
|
usernamePlaceholder: () => string;
|
|
597
855
|
verifyEmailText: () => string;
|
|
856
|
+
confirmPasswordRequired: () => string;
|
|
857
|
+
createUserFailed: () => string;
|
|
598
858
|
}
|
|
599
859
|
export interface SignupIdScreen {
|
|
600
860
|
buttonText: () => string;
|
|
@@ -629,6 +889,16 @@ export interface SignupPasswordScreen {
|
|
|
629
889
|
passwordPlaceholder: () => string;
|
|
630
890
|
showPasswordText: () => string;
|
|
631
891
|
title: () => string;
|
|
892
|
+
passwordTooShort: (vars: {
|
|
893
|
+
minLength: string;
|
|
894
|
+
}) => string;
|
|
895
|
+
passwordMissingLowercase: () => string;
|
|
896
|
+
passwordMissingUppercase: () => string;
|
|
897
|
+
passwordMissingNumber: () => string;
|
|
898
|
+
passwordMissingSpecial: () => string;
|
|
899
|
+
passwordReused: () => string;
|
|
900
|
+
passwordContainsPersonalInfo: () => string;
|
|
901
|
+
passwordContainsForbiddenWord: () => string;
|
|
632
902
|
}
|
|
633
903
|
export interface SmsOtpChallengeScreen {
|
|
634
904
|
buttonText: () => string;
|
|
@@ -647,6 +917,7 @@ export interface SmsOtpChallengeScreen {
|
|
|
647
917
|
sessionExpired: () => string;
|
|
648
918
|
title: () => string;
|
|
649
919
|
unexpectedError: () => string;
|
|
920
|
+
tooManyRequests: () => string;
|
|
650
921
|
}
|
|
651
922
|
export interface StatusScreen {
|
|
652
923
|
continueButtonText: () => string;
|
|
@@ -659,10 +930,22 @@ export interface StatusScreen {
|
|
|
659
930
|
}
|
|
660
931
|
export interface ScreenMap {
|
|
661
932
|
"common.common": CommonScreen;
|
|
933
|
+
"common.account": CommonAccountScreen;
|
|
934
|
+
"common.account-profile": CommonAccountProfileScreen;
|
|
935
|
+
"common.account-delete": CommonAccountDeleteScreen;
|
|
936
|
+
"common.account-linked": CommonAccountLinkedScreen;
|
|
937
|
+
"common.account-security": CommonAccountSecurityScreen;
|
|
938
|
+
"common.account-passkeys": CommonAccountPasskeysScreen;
|
|
939
|
+
"common.account-mfa-phone-enrollment": CommonAccountMfaPhoneEnrollmentScreen;
|
|
940
|
+
"common.account-mfa-totp-enrollment": CommonAccountMfaTotpEnrollmentScreen;
|
|
662
941
|
"consent.consent": ConsentScreen;
|
|
942
|
+
"consent.connect-consent": ConsentConnectConsentScreen;
|
|
943
|
+
"consent.connect-tenant-select": ConsentConnectTenantSelectScreen;
|
|
663
944
|
"device-flow.device-flow": DeviceFlowScreen;
|
|
664
945
|
"email-otp-challenge.email-otp-challenge": EmailOtpChallengeScreen;
|
|
665
946
|
"email-verification.email-verification": EmailVerificationScreen;
|
|
947
|
+
"email-verification.email-verification-code": EmailVerificationEmailVerificationCodeScreen;
|
|
948
|
+
"email-verification.email-verification-link-sent": EmailVerificationEmailVerificationLinkSentScreen;
|
|
666
949
|
"invitation.invitation": InvitationScreen;
|
|
667
950
|
"login.login": LoginScreen;
|
|
668
951
|
"login-id.login-id": LoginIdScreen;
|
|
@@ -24,10 +24,10 @@ export declare const dcrRequestSchema: z.ZodObject<{
|
|
|
24
24
|
response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
|
|
26
26
|
none: "none";
|
|
27
|
+
private_key_jwt: "private_key_jwt";
|
|
27
28
|
client_secret_post: "client_secret_post";
|
|
28
29
|
client_secret_basic: "client_secret_basic";
|
|
29
30
|
client_secret_jwt: "client_secret_jwt";
|
|
30
|
-
private_key_jwt: "private_key_jwt";
|
|
31
31
|
}>>;
|
|
32
32
|
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
33
33
|
jwks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CodeExecutor, DataAdapters } from "@authhero/adapter-interfaces";
|
|
2
2
|
import { EventDestination } from "./outbox-relay";
|
|
3
3
|
import { type GetServiceToken } from "./outbox-destinations/webhooks";
|
|
4
|
-
import type { OutboxPipelineConfig, WebhookInvoker } from "../types/AuthHeroConfig";
|
|
4
|
+
import type { ActionExecutionLogCapture, OutboxPipelineConfig, WebhookInvoker } from "../types/AuthHeroConfig";
|
|
5
5
|
export interface CreateDefaultDestinationsConfig {
|
|
6
6
|
/**
|
|
7
7
|
* Data adapter — the `logs`, `hooks`, `users`, and `logStreams` adapters are
|
|
@@ -47,6 +47,12 @@ export interface CreateDefaultDestinationsConfig {
|
|
|
47
47
|
* failed per-request delivery would be silently skipped on retry.
|
|
48
48
|
*/
|
|
49
49
|
codeExecutor?: CodeExecutor;
|
|
50
|
+
/**
|
|
51
|
+
* Same value as `init({ actionExecutionLogs })`. Controls which console
|
|
52
|
+
* output cron-drained code hooks persist to `action_executions.logs`, so
|
|
53
|
+
* they match inline deliveries. Defaults to `"full"`.
|
|
54
|
+
*/
|
|
55
|
+
actionExecutionLogs?: ActionExecutionLogCapture;
|
|
50
56
|
/**
|
|
51
57
|
* Same shape as `init({ outbox: { pipeline } })`. When set, cron-drained
|
|
52
58
|
* events are also archived to the Cloudflare Pipelines stream, matching the
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AuditEvent, CodeExecutor } from "@authhero/adapter-interfaces";
|
|
2
2
|
import { EventDestination } from "../outbox-relay";
|
|
3
3
|
import { CodeHookData } from "../../hooks/codehooks";
|
|
4
|
+
import type { ActionExecutionLogCapture } from "../../types/AuthHeroConfig";
|
|
4
5
|
interface CodeHookInvocation {
|
|
5
6
|
eventId: string;
|
|
6
7
|
tenantId: string;
|
|
@@ -42,7 +43,10 @@ export declare class CodeHookDestination implements EventDestination {
|
|
|
42
43
|
name: string;
|
|
43
44
|
private data;
|
|
44
45
|
private codeExecutor?;
|
|
45
|
-
|
|
46
|
+
private logCapture?;
|
|
47
|
+
constructor(data: CodeHookData, codeExecutor?: CodeExecutor, options?: {
|
|
48
|
+
logCapture?: ActionExecutionLogCapture;
|
|
49
|
+
});
|
|
46
50
|
accepts(event: AuditEvent): boolean;
|
|
47
51
|
transform(event: AuditEvent): CodeHookInvocation;
|
|
48
52
|
deliver(invocations: CodeHookInvocation[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
import { DataAdapters } from "@authhero/adapter-interfaces";
|
|
3
|
+
import { Bindings, Variables } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Installs `data` as this request's adapter stack on `ctx.var.data`.
|
|
6
|
+
*
|
|
7
|
+
* Also writes it to `ctx.env.data`, a deprecated alias kept for readers that
|
|
8
|
+
* have not moved to `ctx.var.data` yet, including consumers outside this repo.
|
|
9
|
+
* The env write is only safe because `applyConfigMiddleware` gives every
|
|
10
|
+
* request its own shallow copy of `env`. Drop it in the next major (#140).
|
|
11
|
+
*/
|
|
12
|
+
export declare function setRequestData(ctx: Context<{
|
|
13
|
+
Bindings: Bindings;
|
|
14
|
+
Variables: Variables;
|
|
15
|
+
}>, data: DataAdapters): void;
|
|
16
|
+
/**
|
|
17
|
+
* The raw adapter a route group composes its per-request stack on: the base
|
|
18
|
+
* an earlier middleware installed on `ctx.var.baseData` (per-tenant database
|
|
19
|
+
* isolation), or `fallback`, the startup adapter from the config.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getBaseData(ctx: Context<{
|
|
22
|
+
Bindings: Bindings;
|
|
23
|
+
Variables: Variables;
|
|
24
|
+
}>, fallback: DataAdapters): DataAdapters;
|
|
@@ -14,9 +14,9 @@ export declare const USERINFO_RESERVED_CLAIMS: readonly ["iss", "sub", "aud", "e
|
|
|
14
14
|
* vendor/tenant for downstream APIs while `sub` stays `auth-service`.
|
|
15
15
|
* Client-bound mints keep `azp` locked (see below).
|
|
16
16
|
*/
|
|
17
|
-
export declare const SERVICE_TOKEN_RESERVED_CLAIMS: ("
|
|
17
|
+
export declare const SERVICE_TOKEN_RESERVED_CLAIMS: ("sub" | "permissions" | "tenant_id" | "client_id" | "org_name" | "scope" | "sid" | "exp" | "iat" | "org_id" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
|
|
18
18
|
/** Client-bound mints: `azp` must stay the registered client id. */
|
|
19
|
-
export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("
|
|
19
|
+
export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("sub" | "permissions" | "tenant_id" | "client_id" | "org_name" | "scope" | "sid" | "exp" | "iat" | "org_id" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "azp" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
|
|
20
20
|
export type AccessTokenReservedClaim = (typeof ACCESS_TOKEN_RESERVED_CLAIMS)[number];
|
|
21
21
|
export type IdTokenReservedClaim = (typeof ID_TOKEN_RESERVED_CLAIMS)[number];
|
|
22
22
|
/**
|