authhero 9.34.0 → 9.36.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 (65) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +105 -104
  3. package/dist/authhero.d.ts +304 -220
  4. package/dist/authhero.mjs +16782 -15989
  5. package/dist/{mfa-CDFRupfM.mjs → mfa-B044FRjD.mjs} +18 -18
  6. package/dist/{mfa-DF3O3Z8H.js → mfa-DPwn1ajo.js} +1 -1
  7. package/dist/mfa-attempts-BiU_pMOV.js +275 -0
  8. package/dist/{mfa-attempts-C06Bkdy9.mjs → mfa-attempts-DGOLb2oh.mjs} +6417 -6092
  9. package/dist/{passkey-enrollment-RGw-WaSq.js → passkey-enrollment-BDboqoaP.js} +1 -1
  10. package/dist/tsconfig.types.tsbuildinfo +1 -1
  11. package/dist/types/authentication-flows/passwordless.d.ts +6 -412
  12. package/dist/types/emails/from-address.d.ts +21 -0
  13. package/dist/types/errors/management-api-error.d.ts +3 -0
  14. package/dist/types/helpers/branding-assets.d.ts +28 -0
  15. package/dist/types/helpers/client.d.ts +5 -2
  16. package/dist/types/helpers/database-connection-scope.d.ts +67 -0
  17. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  18. package/dist/types/helpers/link-candidates.d.ts +7 -1
  19. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  20. package/dist/types/helpers/self-service-connections.d.ts +42 -0
  21. package/dist/types/helpers/sso-access-tickets.d.ts +18 -0
  22. package/dist/types/helpers/users.d.ts +29 -4
  23. package/dist/types/index.d.ts +298 -217
  24. package/dist/types/routes/assets.d.ts +11 -0
  25. package/dist/types/routes/auth-api/device.d.ts +8 -8
  26. package/dist/types/routes/auth-api/index.d.ts +40 -38
  27. package/dist/types/routes/auth-api/passwordless.d.ts +14 -12
  28. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  29. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  30. package/dist/types/routes/auth-api/token.d.ts +10 -10
  31. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  32. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  33. package/dist/types/routes/management-api/branding-uploads.d.ts +85 -0
  34. package/dist/types/routes/management-api/branding.d.ts +92 -13
  35. package/dist/types/routes/management-api/clients.d.ts +32 -32
  36. package/dist/types/routes/management-api/connections.d.ts +24 -24
  37. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  38. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  39. package/dist/types/routes/management-api/failed-events.d.ts +2 -2
  40. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  41. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  42. package/dist/types/routes/management-api/hook-code.d.ts +2 -2
  43. package/dist/types/routes/management-api/index.d.ts +251 -172
  44. package/dist/types/routes/management-api/keys.d.ts +8 -8
  45. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  46. package/dist/types/routes/management-api/logs.d.ts +4 -4
  47. package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
  48. package/dist/types/routes/management-api/organizations.d.ts +4 -4
  49. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  50. package/dist/types/routes/management-api/self-service-profiles.d.ts +345 -0
  51. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  52. package/dist/types/routes/management-api/tenant-operations.d.ts +10 -10
  53. package/dist/types/routes/management-api/tenants.d.ts +13 -13
  54. package/dist/types/routes/management-api/themes.d.ts +9 -9
  55. package/dist/types/routes/management-api/users.d.ts +29 -29
  56. package/dist/types/routes/universal-login/common.d.ts +12 -828
  57. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  58. package/dist/types/routes/universal-login/index.d.ts +2 -2
  59. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  60. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  61. package/dist/types/state-machines/login-session.d.ts +1 -1
  62. package/dist/types/types/Bindings.d.ts +1 -0
  63. package/dist/types/utils/username-password-provider.d.ts +14 -3
  64. package/package.json +6 -6
  65. package/dist/mfa-attempts-BOWgbEPg.js +0 -275
@@ -30,7 +30,7 @@ export declare const identifierRoutes: OpenAPIHono<{
30
30
  } & {
31
31
  form: {
32
32
  username: string;
33
- login_selection?: "password" | "code" | undefined;
33
+ login_selection?: "code" | "password" | undefined;
34
34
  };
35
35
  };
36
36
  output: {};
@@ -44,7 +44,7 @@ export declare const identifierRoutes: OpenAPIHono<{
44
44
  } & {
45
45
  form: {
46
46
  username: string;
47
- login_selection?: "password" | "code" | undefined;
47
+ login_selection?: "code" | "password" | undefined;
48
48
  };
49
49
  };
50
50
  output: {};
@@ -515,7 +515,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
515
515
  } & {
516
516
  form: {
517
517
  username: string;
518
- login_selection?: "password" | "code" | undefined;
518
+ login_selection?: "code" | "password" | undefined;
519
519
  };
520
520
  };
521
521
  output: {};
@@ -529,7 +529,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
529
529
  } & {
530
530
  form: {
531
531
  username: string;
532
- login_selection?: "password" | "code" | undefined;
532
+ login_selection?: "code" | "password" | undefined;
533
533
  };
534
534
  };
535
535
  output: {};
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
165
165
  $get: {
166
166
  input: {
167
167
  param: {
168
- screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
168
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
169
169
  };
170
170
  } & {
171
171
  query: {
@@ -181,7 +181,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
181
181
  } | {
182
182
  input: {
183
183
  param: {
184
- screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
184
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
185
185
  };
186
186
  } & {
187
187
  query: {
@@ -197,7 +197,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
197
197
  } | {
198
198
  input: {
199
199
  param: {
200
- screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
200
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
201
201
  };
202
202
  } & {
203
203
  query: {
@@ -217,7 +217,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
217
217
  $post: {
218
218
  input: {
219
219
  param: {
220
- screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
220
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
221
221
  };
222
222
  } & {
223
223
  query: {
@@ -235,7 +235,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
235
235
  } | {
236
236
  input: {
237
237
  param: {
238
- screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
238
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
239
239
  };
240
240
  } & {
241
241
  query: {
@@ -170,7 +170,7 @@ export declare const u2Routes: OpenAPIHono<{
170
170
  $get: {
171
171
  input: {
172
172
  param: {
173
- screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
173
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
174
174
  };
175
175
  } & {
176
176
  query: {
@@ -186,7 +186,7 @@ export declare const u2Routes: OpenAPIHono<{
186
186
  } | {
187
187
  input: {
188
188
  param: {
189
- screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
189
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
190
190
  };
191
191
  } & {
192
192
  query: {
@@ -202,7 +202,7 @@ export declare const u2Routes: OpenAPIHono<{
202
202
  } | {
203
203
  input: {
204
204
  param: {
205
- screen: "signup" | "reset-password" | "impersonate" | "account" | "consent" | "login" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
205
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
206
206
  };
207
207
  } & {
208
208
  query: {
@@ -222,7 +222,7 @@ export declare const u2Routes: OpenAPIHono<{
222
222
  $post: {
223
223
  input: {
224
224
  param: {
225
- screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
225
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
226
226
  };
227
227
  } & {
228
228
  query: {
@@ -240,7 +240,7 @@ export declare const u2Routes: OpenAPIHono<{
240
240
  } | {
241
241
  input: {
242
242
  param: {
243
- screen: "signup" | "reset-password" | "impersonate" | "consent" | "login" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
243
+ screen: "signup" | "login" | "impersonate" | "reset-password" | "consent" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
244
244
  };
245
245
  } & {
246
246
  query: {
@@ -234,7 +234,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
234
234
  }, {
235
235
  type: "passwordResetRequested";
236
236
  params: unknown;
237
- }, never, "pending" | "failed" | "expired" | "authenticated" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation" | "completed", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
237
+ }, never, "pending" | "failed" | "expired" | "completed" | "authenticated" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
238
238
  id: "loginSession";
239
239
  states: {
240
240
  readonly pending: {};
@@ -8,6 +8,7 @@ export type Bindings = {
8
8
  ENVIRONMENT: string;
9
9
  AUTH_URL: string;
10
10
  ISSUER: string;
11
+ DEFAULT_SENDER_EMAIL?: string;
11
12
  UNIVERSAL_LOGIN_URL?: string;
12
13
  OAUTH_API_URL?: string;
13
14
  ENCRYPTION_KEY?: string;
@@ -38,6 +38,13 @@ interface DualReadParams {
38
38
  env: Bindings;
39
39
  tenant_id: string;
40
40
  username: string;
41
+ /**
42
+ * Name of the database connection to look in (#1702). Rows of the tenant's
43
+ * other database connections are skipped. Has no effect for tenants with a
44
+ * single database connection, or when the name isn't one of the tenant's
45
+ * database connections; see `resolveDatabaseConnectionScope`.
46
+ */
47
+ connection?: string;
41
48
  }
42
49
  /**
43
50
  * Look up a native database user, accepting either provider value.
@@ -49,17 +56,21 @@ interface DualReadParams {
49
56
  * etc.) we want login to keep using the `auth2` row so credentials
50
57
  * continue to work. The migration script merges the duplicates.
51
58
  */
52
- export declare function getUsernamePasswordUser({ env, tenant_id, username, }: DualReadParams): Promise<User | null>;
59
+ export declare function getUsernamePasswordUser({ env, tenant_id, username, connection, }: DualReadParams): Promise<User | null>;
53
60
  /**
54
61
  * Same as {@link getUsernamePasswordUser} but resolves to the primary user
55
- * if a linked secondary is matched. Same `auth2`-first ordering.
62
+ * if a linked secondary is matched. Same ordering: the row is chosen first,
63
+ * then its cluster root.
56
64
  */
57
- export declare function getPrimaryUsernamePasswordUser({ env, tenant_id, username, }: DualReadParams): Promise<User | null>;
65
+ export declare function getPrimaryUsernamePasswordUser(params: DualReadParams): Promise<User | null>;
58
66
  /**
59
67
  * Find-or-create wrapper that first looks for an existing native database
60
68
  * user under EITHER provider value, and only creates a new row (under the
61
69
  * configured provider) if none exists. Prevents duplicating an existing
62
70
  * `auth2|*` user when the tenant is migrated to `"auth0"`.
71
+ *
72
+ * `connection` is written on a new row and scopes the existing-user lookup,
73
+ * see {@link DualReadParams}.
63
74
  */
64
75
  export declare function getOrCreateUsernamePasswordUser(ctx: Context<{
65
76
  Bindings: Bindings;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/sesamyab/authhero"
13
13
  },
14
- "version": "9.34.0",
14
+ "version": "9.36.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -63,8 +63,8 @@
63
63
  "vite": "^8.0.14",
64
64
  "vite-plugin-dts": "^4.5.4",
65
65
  "vitest": "^4.1.7",
66
- "@authhero/kysely-adapter": "12.20.1",
67
- "@authhero/widget": "0.41.13"
66
+ "@authhero/kysely-adapter": "12.22.0",
67
+ "@authhero/widget": "0.41.15"
68
68
  },
69
69
  "dependencies": {
70
70
  "@peculiar/x509": "^1.14.3",
@@ -81,9 +81,9 @@
81
81
  "qrcode": "^1.5.4",
82
82
  "sanitize-html": "^2.17.4",
83
83
  "xstate": "^5.31.1",
84
- "@authhero/adapter-interfaces": "4.29.0",
85
- "@authhero/proxy": "0.11.16",
86
- "@authhero/saml": "0.6.9"
84
+ "@authhero/adapter-interfaces": "4.31.0",
85
+ "@authhero/proxy": "0.11.18",
86
+ "@authhero/saml": "0.6.11"
87
87
  },
88
88
  "peerDependencies": {
89
89
  "@authhero/widget": ">=0.38.9",