authhero 9.19.0 → 9.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/authhero.cjs +185 -173
  2. package/dist/authhero.d.ts +355 -241
  3. package/dist/authhero.mjs +19286 -16839
  4. package/dist/tsconfig.types.tsbuildinfo +1 -1
  5. package/dist/types/authentication-flows/email-verification.d.ts +74 -0
  6. package/dist/types/authentication-flows/password.d.ts +3 -2
  7. package/dist/types/authentication-flows/passwordless.d.ts +2 -2
  8. package/dist/types/emails/index.d.ts +27 -1
  9. package/dist/types/generated/locale-types.d.ts +282 -0
  10. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  11. package/dist/types/helpers/default-destinations.d.ts +7 -1
  12. package/dist/types/helpers/outbox-destinations/code-hooks.d.ts +5 -1
  13. package/dist/types/helpers/request-data.d.ts +15 -0
  14. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  15. package/dist/types/helpers/run-outbox-relay.d.ts +7 -1
  16. package/dist/types/hooks/codehooks.d.ts +14 -1
  17. package/dist/types/index.d.ts +288 -238
  18. package/dist/types/routes/auth-api/index.d.ts +12 -12
  19. package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
  20. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  21. package/dist/types/routes/auth-api/token.d.ts +10 -10
  22. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  23. package/dist/types/routes/management-api/action-triggers.d.ts +1 -1
  24. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  25. package/dist/types/routes/management-api/branding.d.ts +1 -1
  26. package/dist/types/routes/management-api/client-grants.d.ts +9 -9
  27. package/dist/types/routes/management-api/connections.d.ts +7 -7
  28. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  29. package/dist/types/routes/management-api/failed-events.d.ts +51 -1
  30. package/dist/types/routes/management-api/forms.d.ts +126 -126
  31. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  32. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  33. package/dist/types/routes/management-api/hook-code.d.ts +2 -2
  34. package/dist/types/routes/management-api/index.d.ts +269 -219
  35. package/dist/types/routes/management-api/keys.d.ts +8 -8
  36. package/dist/types/routes/management-api/logs.d.ts +4 -4
  37. package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
  38. package/dist/types/routes/management-api/organizations.d.ts +6 -6
  39. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  40. package/dist/types/routes/management-api/roles.d.ts +1 -1
  41. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  42. package/dist/types/routes/management-api/tenant-operations.d.ts +1 -1
  43. package/dist/types/routes/management-api/tenants.d.ts +6 -6
  44. package/dist/types/routes/management-api/themes.d.ts +6 -6
  45. package/dist/types/routes/management-api/users.d.ts +15 -15
  46. package/dist/types/routes/universal-login/common.d.ts +4 -4
  47. package/dist/types/routes/universal-login/error-page.d.ts +9 -2
  48. package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
  49. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  50. package/dist/types/routes/universal-login/index.d.ts +2 -2
  51. package/dist/types/routes/universal-login/sanitization-utils.d.ts +7 -0
  52. package/dist/types/routes/universal-login/screen-prompt-map.d.ts +2 -0
  53. package/dist/types/routes/universal-login/screens/email-verification.d.ts +29 -0
  54. package/dist/types/routes/universal-login/screens/handler-error.d.ts +11 -0
  55. package/dist/types/routes/universal-login/screens/reset-password.d.ts +5 -1
  56. package/dist/types/routes/universal-login/screens/signup.d.ts +6 -0
  57. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  58. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  59. package/dist/types/types/AuthHeroConfig.d.ts +25 -0
  60. package/dist/types/types/Bindings.d.ts +8 -1
  61. package/dist/types/types/Variables.d.ts +18 -1
  62. package/package.json +6 -6
@@ -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;
@@ -561,8 +561,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
561
561
  } | undefined;
562
562
  authenticated_at?: string | undefined;
563
563
  };
564
- connectionType: "username" | "email" | "sms";
565
- authConnection: "username" | "email" | "sms";
564
+ connectionType: "username" | "sms" | "email";
565
+ authConnection: "username" | "sms" | "email";
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;
@@ -20,6 +20,162 @@ export interface CommonScreen {
20
20
  termsShortText: () => string;
21
21
  tryAgainText: () => string;
22
22
  }
23
+ export interface CommonAccountScreen {
24
+ title: () => string;
25
+ description: () => string;
26
+ editProfileLabel: () => string;
27
+ editProfileDetail: () => string;
28
+ securityLabel: () => string;
29
+ securityDetail: () => string;
30
+ securityMethodsCountOne: (vars: {
31
+ count: string;
32
+ }) => string;
33
+ securityMethodsCount: (vars: {
34
+ count: string;
35
+ }) => string;
36
+ passkeysLabel: () => string;
37
+ passkeysDetail: () => string;
38
+ passkeysCountOne: (vars: {
39
+ count: string;
40
+ }) => string;
41
+ passkeysCount: (vars: {
42
+ count: string;
43
+ }) => string;
44
+ linkedAccountsLabel: () => string;
45
+ linkedAccountsDetail: () => string;
46
+ linkedAccountsCountOne: (vars: {
47
+ count: string;
48
+ }) => string;
49
+ linkedAccountsCount: (vars: {
50
+ count: string;
51
+ }) => string;
52
+ deleteAccountLabel: () => string;
53
+ deleteAccountDetail: () => string;
54
+ logoutText: () => string;
55
+ }
56
+ export interface CommonAccountProfileScreen {
57
+ title: () => string;
58
+ description: () => string;
59
+ givenNameLabel: () => string;
60
+ familyNameLabel: () => string;
61
+ nicknameLabel: () => string;
62
+ phoneNumberLabel: () => string;
63
+ pictureLabel: () => string;
64
+ buttonText: () => string;
65
+ backToAccountText: () => string;
66
+ updateFailed: () => string;
67
+ }
68
+ export interface CommonAccountDeleteScreen {
69
+ title: () => string;
70
+ description: () => string;
71
+ warningTitle: () => string;
72
+ warningText: () => string;
73
+ confirmationLabel: (vars: {
74
+ confirmationWord: string;
75
+ }) => string;
76
+ buttonText: () => string;
77
+ cancelText: () => string;
78
+ confirmationError: (vars: {
79
+ confirmationWord: string;
80
+ }) => string;
81
+ deleteSuccess: () => string;
82
+ deleteFailed: () => string;
83
+ }
84
+ export interface CommonAccountLinkedScreen {
85
+ title: () => string;
86
+ description: () => string;
87
+ noLinkedAccounts: () => string;
88
+ unlinkButtonText: () => string;
89
+ backToAccountText: () => string;
90
+ unlinkSuccess: () => string;
91
+ unlinkFailed: () => string;
92
+ }
93
+ export interface CommonAccountSecurityScreen {
94
+ title: () => string;
95
+ description: () => string;
96
+ noEnrollments: () => string;
97
+ addedOn: (vars: {
98
+ date: string;
99
+ }) => string;
100
+ removeButtonText: () => string;
101
+ addTotpLabel: () => string;
102
+ addTotpDetail: () => string;
103
+ addSmsLabel: () => string;
104
+ addSmsDetail: () => string;
105
+ typeTotp: () => string;
106
+ typePhone: () => string;
107
+ typeEmail: () => string;
108
+ typePush: () => string;
109
+ typeWebauthn: () => string;
110
+ backToAccountText: () => string;
111
+ enrollmentNotFound: () => string;
112
+ removeSuccess: () => string;
113
+ removeFailed: () => string;
114
+ }
115
+ export interface CommonAccountPasskeysScreen {
116
+ title: () => string;
117
+ description: () => string;
118
+ noPasskeysText: () => string;
119
+ defaultPasskeyName: () => string;
120
+ syncedBadgeText: () => string;
121
+ addedOnText: (vars: {
122
+ date: string;
123
+ }) => string;
124
+ renameButtonText: () => string;
125
+ removeButtonText: () => string;
126
+ renamePromptText: () => string;
127
+ addPasskeyButtonText: () => string;
128
+ backToAccountText: () => string;
129
+ logoutText: () => string;
130
+ passkeyNotFoundText: () => string;
131
+ passkeyRemovedText: () => string;
132
+ removeFailedText: () => string;
133
+ invalidNameText: () => string;
134
+ passkeyRenamedText: () => string;
135
+ renameFailedText: () => string;
136
+ startRegistrationFailedText: () => string;
137
+ missingCredentialText: () => string;
138
+ challengeExpiredText: () => string;
139
+ invalidCredentialText: () => string;
140
+ verificationFailedText: () => string;
141
+ passkeyAddedText: () => string;
142
+ registrationFailedText: () => string;
143
+ }
144
+ export interface CommonAccountMfaPhoneEnrollmentScreen {
145
+ title: () => string;
146
+ description: () => string;
147
+ phoneLabel: () => string;
148
+ sendCodeButtonText: () => string;
149
+ backToSecurityText: () => string;
150
+ verifyTitle: () => string;
151
+ verifyDescription: () => string;
152
+ codeSentText: (vars: {
153
+ phoneNumber: string;
154
+ }) => string;
155
+ codeSentToYourPhoneText: () => string;
156
+ codeLabel: () => string;
157
+ codePlaceholder: () => string;
158
+ verifyButtonText: () => string;
159
+ noPhoneText: () => string;
160
+ invalidPhoneText: () => string;
161
+ sendCodeFailedText: () => string;
162
+ noCodeText: () => string;
163
+ invalidCodeText: () => string;
164
+ sessionInvalidText: () => string;
165
+ }
166
+ export interface CommonAccountMfaTotpEnrollmentScreen {
167
+ title: () => string;
168
+ description: () => string;
169
+ qrCodeAltText: () => string;
170
+ manualKeyText: () => string;
171
+ codeLabel: () => string;
172
+ codePlaceholder: () => string;
173
+ verifyButtonText: () => string;
174
+ backToSecurityText: () => string;
175
+ noCodeText: () => string;
176
+ invalidCodeText: () => string;
177
+ verificationFailedText: () => string;
178
+ }
23
179
  export interface ConsentScreen {
24
180
  buttonText: () => string;
25
181
  cancelButtonText: () => string;
@@ -35,6 +191,51 @@ export interface ConsentScreen {
35
191
  title: (vars: {
36
192
  clientName: string;
37
193
  }) => string;
194
+ accessAccountText: (vars: {
195
+ tenantName: string;
196
+ userName: string;
197
+ }) => string;
198
+ notAuthenticated: () => string;
199
+ sessionExpired: () => string;
200
+ consentStorageNotConfigured: () => string;
201
+ }
202
+ export interface ConsentConnectConsentScreen {
203
+ title: () => string;
204
+ description: (vars: {
205
+ domain: string;
206
+ }) => string;
207
+ connectAccountText: (vars: {
208
+ tenantName: string;
209
+ userName: string;
210
+ }) => string;
211
+ workspaceLabel: () => string;
212
+ apiLabel: () => string;
213
+ permissionsLabel: () => string;
214
+ localDevBadge: () => string;
215
+ localDevTooltip: () => string;
216
+ buttonText: () => string;
217
+ cancelText: () => string;
218
+ notAuthenticated: () => string;
219
+ sessionExpired: () => string;
220
+ workspaceSelectionRequired: () => string;
221
+ noWorkspaceAccess: () => string;
222
+ workspaceNotFound: () => string;
223
+ }
224
+ export interface ConsentConnectTenantSelectScreen {
225
+ title: () => string;
226
+ description: (vars: {
227
+ domain: string;
228
+ tenantName: string;
229
+ }) => string;
230
+ noWorkspacesDescription: () => string;
231
+ noWorkspacesText: (vars: {
232
+ tenantName: string;
233
+ }) => string;
234
+ cancelText: () => string;
235
+ notAuthenticated: () => string;
236
+ sessionExpired: () => string;
237
+ noWorkspaceSelected: () => string;
238
+ noWorkspaceAccess: () => string;
38
239
  }
39
240
  export interface DeviceFlowScreen {
40
241
  buttonText: () => string;
@@ -65,11 +266,17 @@ export interface EmailOtpChallengeScreen {
65
266
  title: () => string;
66
267
  unexpectedError: () => string;
67
268
  usePasswordText: () => string;
269
+ tooManyRequests: () => string;
68
270
  }
69
271
  export interface EmailVerificationScreen {
70
272
  description: (vars: {
71
273
  email: string;
72
274
  }) => string;
275
+ linkAlreadyUsed: () => string;
276
+ linkInvalid: () => string;
277
+ linkInvalidOrExpired: () => string;
278
+ linkInvalidTitle: () => string;
279
+ linkWrongType: () => string;
73
280
  pageTitle: (vars: {
74
281
  clientName: string;
75
282
  }) => string;
@@ -78,6 +285,39 @@ export interface EmailVerificationScreen {
78
285
  successTitle: () => string;
79
286
  title: () => string;
80
287
  }
288
+ export interface EmailVerificationEmailVerificationCodeScreen {
289
+ buttonText: () => string;
290
+ codeLabel: () => string;
291
+ codePlaceholder: () => string;
292
+ defaultDescription: () => string;
293
+ description: (vars: {
294
+ email: string;
295
+ }) => string;
296
+ invalidCode: () => string;
297
+ noCode: () => string;
298
+ pageTitle: (vars: {
299
+ clientName: string;
300
+ }) => string;
301
+ resendFailed: () => string;
302
+ resendSuccess: () => string;
303
+ resendText: () => string;
304
+ sessionExpired: () => string;
305
+ title: () => string;
306
+ tooManyAttempts: () => string;
307
+ }
308
+ export interface EmailVerificationEmailVerificationLinkSentScreen {
309
+ defaultDescription: () => string;
310
+ description: (vars: {
311
+ email: string;
312
+ }) => string;
313
+ pageTitle: (vars: {
314
+ clientName: string;
315
+ }) => string;
316
+ resendFailed: () => string;
317
+ resendSuccess: () => string;
318
+ resendText: () => string;
319
+ title: () => string;
320
+ }
81
321
  export interface InvitationScreen {
82
322
  acceptButtonText: () => string;
83
323
  description: (vars: {
@@ -89,6 +329,8 @@ export interface InvitationScreen {
89
329
  clientName: string;
90
330
  }) => string;
91
331
  title: () => string;
332
+ defaultOrganizationName: () => string;
333
+ acceptFailed: () => string;
92
334
  }
93
335
  export interface LoginScreen {
94
336
  alertListTitle: () => string;
@@ -145,6 +387,9 @@ export interface LoginScreen {
145
387
  }) => string;
146
388
  passkeyButtonText: () => string;
147
389
  wrongCredentials: () => string;
390
+ userBlocked: () => string;
391
+ tooManyRequests: () => string;
392
+ unexpectedError: () => string;
148
393
  }
149
394
  export interface LoginIdScreen {
150
395
  alertListTitle: () => string;
@@ -272,6 +517,9 @@ export interface LoginPasswordScreen {
272
517
  "user-blocked": () => string;
273
518
  "wrong-credentials": () => string;
274
519
  sendCodeText: () => string;
520
+ sessionExpired: () => string;
521
+ tooManyRequests: () => string;
522
+ unexpectedError: () => string;
275
523
  }
276
524
  export interface LoginPasswordlessScreen {
277
525
  authMethodEmail: () => string;
@@ -345,6 +593,8 @@ export interface MfaOtpMfaTotpEnrollmentScreen {
345
593
  clientName: string;
346
594
  }) => string;
347
595
  enrollmentComplete: () => string;
596
+ pickAuthenticatorText: () => string;
597
+ qrCodeAltText: () => string;
348
598
  }
349
599
  export interface MfaOtpMfaTotpChallengeScreen {
350
600
  title: () => string;
@@ -494,6 +744,9 @@ export interface PasskeysPasskeyEnrollmentScreen {
494
744
  pageTitle: (vars: {
495
745
  clientName: string;
496
746
  }) => string;
747
+ sessionExpired: () => string;
748
+ enrollmentRequired: () => string;
749
+ challengeExpired: () => string;
497
750
  }
498
751
  export interface PasskeysPasskeyChallengeScreen {
499
752
  title: () => string;
@@ -504,6 +757,7 @@ export interface PasskeysPasskeyChallengeScreen {
504
757
  pageTitle: (vars: {
505
758
  clientName: string;
506
759
  }) => string;
760
+ sessionExpired: () => string;
507
761
  }
508
762
  export interface OrganizationsScreen {
509
763
  description: () => string;
@@ -535,6 +789,8 @@ export interface ResetPasswordScreen {
535
789
  successTitle: () => string;
536
790
  title: () => string;
537
791
  "user-not-found": () => string;
792
+ noPassword: () => string;
793
+ sessionExpired: () => string;
538
794
  }
539
795
  export interface ResetPasswordResetPasswordCodeScreen {
540
796
  backToLoginText: () => string;
@@ -562,6 +818,7 @@ export interface ResetPasswordResetPasswordCodeScreen {
562
818
  resendText: () => string;
563
819
  sessionExpired: () => string;
564
820
  title: () => string;
821
+ noPassword: () => string;
565
822
  }
566
823
  export interface SignupScreen {
567
824
  buttonText: () => string;
@@ -595,6 +852,8 @@ export interface SignupScreen {
595
852
  "username-already-exists": () => string;
596
853
  usernamePlaceholder: () => string;
597
854
  verifyEmailText: () => string;
855
+ confirmPasswordRequired: () => string;
856
+ createUserFailed: () => string;
598
857
  }
599
858
  export interface SignupIdScreen {
600
859
  buttonText: () => string;
@@ -629,6 +888,16 @@ export interface SignupPasswordScreen {
629
888
  passwordPlaceholder: () => string;
630
889
  showPasswordText: () => string;
631
890
  title: () => string;
891
+ passwordTooShort: (vars: {
892
+ minLength: string;
893
+ }) => string;
894
+ passwordMissingLowercase: () => string;
895
+ passwordMissingUppercase: () => string;
896
+ passwordMissingNumber: () => string;
897
+ passwordMissingSpecial: () => string;
898
+ passwordReused: () => string;
899
+ passwordContainsPersonalInfo: () => string;
900
+ passwordContainsForbiddenWord: () => string;
632
901
  }
633
902
  export interface SmsOtpChallengeScreen {
634
903
  buttonText: () => string;
@@ -647,6 +916,7 @@ export interface SmsOtpChallengeScreen {
647
916
  sessionExpired: () => string;
648
917
  title: () => string;
649
918
  unexpectedError: () => string;
919
+ tooManyRequests: () => string;
650
920
  }
651
921
  export interface StatusScreen {
652
922
  continueButtonText: () => string;
@@ -659,10 +929,22 @@ export interface StatusScreen {
659
929
  }
660
930
  export interface ScreenMap {
661
931
  "common.common": CommonScreen;
932
+ "common.account": CommonAccountScreen;
933
+ "common.account-profile": CommonAccountProfileScreen;
934
+ "common.account-delete": CommonAccountDeleteScreen;
935
+ "common.account-linked": CommonAccountLinkedScreen;
936
+ "common.account-security": CommonAccountSecurityScreen;
937
+ "common.account-passkeys": CommonAccountPasskeysScreen;
938
+ "common.account-mfa-phone-enrollment": CommonAccountMfaPhoneEnrollmentScreen;
939
+ "common.account-mfa-totp-enrollment": CommonAccountMfaTotpEnrollmentScreen;
662
940
  "consent.consent": ConsentScreen;
941
+ "consent.connect-consent": ConsentConnectConsentScreen;
942
+ "consent.connect-tenant-select": ConsentConnectTenantSelectScreen;
663
943
  "device-flow.device-flow": DeviceFlowScreen;
664
944
  "email-otp-challenge.email-otp-challenge": EmailOtpChallengeScreen;
665
945
  "email-verification.email-verification": EmailVerificationScreen;
946
+ "email-verification.email-verification-code": EmailVerificationEmailVerificationCodeScreen;
947
+ "email-verification.email-verification-link-sent": EmailVerificationEmailVerificationLinkSentScreen;
666
948
  "invitation.invitation": InvitationScreen;
667
949
  "login.login": LoginScreen;
668
950
  "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
- constructor(data: CodeHookData, codeExecutor?: CodeExecutor);
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,15 @@
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;
@@ -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: ("tenant_id" | "client_id" | "org_name" | "scope" | "org_id" | "sid" | "sub" | "exp" | "iat" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "permissions" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
17
+ export declare const SERVICE_TOKEN_RESERVED_CLAIMS: ("tenant_id" | "client_id" | "org_name" | "sub" | "sid" | "scope" | "permissions" | "iat" | "org_id" | "aud" | "auth_time" | "exp" | "iss" | "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: ("tenant_id" | "client_id" | "org_name" | "scope" | "org_id" | "sid" | "sub" | "exp" | "iat" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "azp" | "permissions" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
19
+ export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("tenant_id" | "client_id" | "org_name" | "sub" | "sid" | "scope" | "permissions" | "iat" | "org_id" | "aud" | "auth_time" | "exp" | "iss" | "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
  /**
@@ -1,5 +1,5 @@
1
1
  import { CodeExecutor, DataAdapters } from "@authhero/adapter-interfaces";
2
- import type { WebhookInvoker } from "../types/AuthHeroConfig";
2
+ import type { ActionExecutionLogCapture, WebhookInvoker } from "../types/AuthHeroConfig";
3
3
  import type { OutboxMetricsSink } from "../types/OutboxMetrics";
4
4
  export interface RunOutboxRelayConfig {
5
5
  /** Same `DataAdapters` passed to `init()`. Must include `outbox` to drain. */
@@ -32,6 +32,12 @@ export interface RunOutboxRelayConfig {
32
32
  * silently skipped.
33
33
  */
34
34
  codeExecutor?: CodeExecutor;
35
+ /**
36
+ * Same value as `init({ actionExecutionLogs })`, so code hooks run by this
37
+ * cron drain persist console output the same way as inline deliveries.
38
+ * Defaults to `"full"`.
39
+ */
40
+ actionExecutionLogs?: ActionExecutionLogCapture;
35
41
  /**
36
42
  * Optional metrics sink — same shape as `init({ outbox: { metrics } })`.
37
43
  * Receives `outbox_events_processed_total`,