authhero 9.0.0 → 9.1.1

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 (53) hide show
  1. package/dist/assets/u/widget/authhero-widget.esm.js +1 -1
  2. package/dist/assets/u/widget/index.esm.js +1 -1
  3. package/dist/assets/u/widget/{p-f6babd26.entry.js → p-c179b5da.entry.js} +1 -1
  4. package/dist/assets/u/widget/{p-52a70476.entry.js → p-cdfc4555.entry.js} +1 -1
  5. package/dist/authhero.cjs +211 -208
  6. package/dist/authhero.d.ts +232 -197
  7. package/dist/authhero.mjs +26152 -24944
  8. package/dist/tsconfig.types.tsbuildinfo +1 -1
  9. package/dist/types/authentication-flows/common.d.ts +6 -0
  10. package/dist/types/authentication-flows/passwordless.d.ts +3 -2
  11. package/dist/types/constants.d.ts +2 -0
  12. package/dist/types/generated/locale-types.d.ts +2 -0
  13. package/dist/types/helpers/client.d.ts +2 -2
  14. package/dist/types/helpers/revoke-user-sessions.d.ts +15 -0
  15. package/dist/types/helpers/scim/default-mapping.d.ts +10 -0
  16. package/dist/types/helpers/scim/discovery.d.ts +49 -0
  17. package/dist/types/helpers/scim/filter.d.ts +58 -0
  18. package/dist/types/helpers/scim/mint-token.d.ts +11 -0
  19. package/dist/types/helpers/scim/patch.d.ts +23 -0
  20. package/dist/types/helpers/scim/responses.d.ts +36 -0
  21. package/dist/types/helpers/scim/user-mapping.d.ts +76 -0
  22. package/dist/types/helpers/service-token.d.ts +16 -5
  23. package/dist/types/helpers/users.d.ts +73 -1
  24. package/dist/types/hooks/post-user-login.d.ts +6 -0
  25. package/dist/types/hooks/user-registration.d.ts +1 -0
  26. package/dist/types/index.d.ts +224 -195
  27. package/dist/types/middlewares/scim-auth.d.ts +19 -0
  28. package/dist/types/routes/auth-api/index.d.ts +8 -8
  29. package/dist/types/routes/auth-api/oidc-logout.d.ts +2 -2
  30. package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
  31. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  32. package/dist/types/routes/management-api/branding.d.ts +1 -1
  33. package/dist/types/routes/management-api/connections.d.ts +1 -1
  34. package/dist/types/routes/management-api/failed-events.d.ts +1 -1
  35. package/dist/types/routes/management-api/forms.d.ts +14 -0
  36. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  37. package/dist/types/routes/management-api/index.d.ts +207 -182
  38. package/dist/types/routes/management-api/logs.d.ts +4 -4
  39. package/dist/types/routes/management-api/organizations.d.ts +5 -5
  40. package/dist/types/routes/management-api/prompts.d.ts +6 -4
  41. package/dist/types/routes/management-api/scim.d.ts +187 -0
  42. package/dist/types/routes/management-api/tenants.d.ts +6 -6
  43. package/dist/types/routes/management-api/users-by-email.d.ts +1 -0
  44. package/dist/types/routes/management-api/users.d.ts +10 -2
  45. package/dist/types/routes/scim/index.d.ts +6 -0
  46. package/dist/types/routes/universal-login/common.d.ts +1 -0
  47. package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
  48. package/dist/types/routes/universal-login/screens/types.d.ts +9 -0
  49. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  50. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  51. package/dist/types/types/AuthError.d.ts +1 -1
  52. package/dist/types/utils/cookies.d.ts +11 -0
  53. package/package.json +6 -6
@@ -0,0 +1,19 @@
1
+ import { MiddlewareHandler } from "hono";
2
+ import { Bindings, Variables } from "../types";
3
+ /**
4
+ * Authenticates a `/scim/v2/connections/:connection_id` request with its SCIM
5
+ * bearer token: hash the presented token, resolve it via `getByHash`, bind it
6
+ * to the connection in the path, honour `valid_until` and the token's scopes,
7
+ * and require a SCIM configuration on the connection. On success the token's
8
+ * `last_used_at` is bumped. Tenant is already resolved by `tenantMiddleware`
9
+ * upstream.
10
+ *
11
+ * Scopes are only enforced when the token carries them: a token minted without
12
+ * scopes (the default, and what Auth0 treats as "all operations") can perform
13
+ * any supported operation, while a scoped token is held to exactly what it was
14
+ * granted.
15
+ */
16
+ export declare const scimAuthMiddleware: MiddlewareHandler<{
17
+ Bindings: Bindings;
18
+ Variables: Variables;
19
+ }>;
@@ -736,16 +736,16 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
736
736
  email: string;
737
737
  send: "code" | "link";
738
738
  authParams: {
739
- audience?: string | undefined;
740
- scope?: string | undefined;
741
- redirect_uri?: string | undefined;
742
- organization?: string | undefined;
743
739
  username?: string | undefined;
744
740
  state?: string | undefined;
745
741
  act_as?: string | undefined;
746
742
  response_type?: import("@authhero/adapter-interfaces").AuthorizationResponseType | undefined;
747
743
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
744
+ redirect_uri?: string | undefined;
745
+ audience?: string | undefined;
746
+ organization?: string | undefined;
748
747
  nonce?: string | undefined;
748
+ scope?: string | undefined;
749
749
  prompt?: string | undefined;
750
750
  code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
751
751
  code_challenge?: string | undefined;
@@ -772,16 +772,16 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
772
772
  phone_number: string;
773
773
  send: "code" | "link";
774
774
  authParams: {
775
- audience?: string | undefined;
776
- scope?: string | undefined;
777
- redirect_uri?: string | undefined;
778
- organization?: string | undefined;
779
775
  username?: string | undefined;
780
776
  state?: string | undefined;
781
777
  act_as?: string | undefined;
782
778
  response_type?: import("@authhero/adapter-interfaces").AuthorizationResponseType | undefined;
783
779
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
780
+ redirect_uri?: string | undefined;
781
+ audience?: string | undefined;
782
+ organization?: string | undefined;
784
783
  nonce?: string | undefined;
784
+ scope?: string | undefined;
785
785
  prompt?: string | undefined;
786
786
  code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
787
787
  code_challenge?: string | undefined;
@@ -18,7 +18,7 @@ export declare const oidcLogoutRoutes: OpenAPIHono<{
18
18
  };
19
19
  output: {};
20
20
  outputFormat: string;
21
- status: 200;
21
+ status: 302;
22
22
  } | {
23
23
  input: {
24
24
  query: {
@@ -32,7 +32,7 @@ export declare const oidcLogoutRoutes: OpenAPIHono<{
32
32
  };
33
33
  output: {};
34
34
  outputFormat: string;
35
- status: 302;
35
+ status: 200;
36
36
  } | {
37
37
  input: {
38
38
  query: {
@@ -14,16 +14,16 @@ export declare const passwordlessRoutes: OpenAPIHono<{
14
14
  email: string;
15
15
  send: "code" | "link";
16
16
  authParams: {
17
- audience?: string | undefined;
18
- scope?: string | undefined;
19
- redirect_uri?: string | undefined;
20
- organization?: string | undefined;
21
17
  username?: string | undefined;
22
18
  state?: string | undefined;
23
19
  act_as?: string | undefined;
24
20
  response_type?: AuthorizationResponseType | undefined;
25
21
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
22
+ redirect_uri?: string | undefined;
23
+ audience?: string | undefined;
24
+ organization?: string | undefined;
26
25
  nonce?: string | undefined;
26
+ scope?: string | undefined;
27
27
  prompt?: string | undefined;
28
28
  code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
29
29
  code_challenge?: string | undefined;
@@ -50,16 +50,16 @@ export declare const passwordlessRoutes: OpenAPIHono<{
50
50
  phone_number: string;
51
51
  send: "code" | "link";
52
52
  authParams: {
53
- audience?: string | undefined;
54
- scope?: string | undefined;
55
- redirect_uri?: string | undefined;
56
- organization?: string | undefined;
57
53
  username?: string | undefined;
58
54
  state?: string | undefined;
59
55
  act_as?: string | undefined;
60
56
  response_type?: AuthorizationResponseType | undefined;
61
57
  response_mode?: import("@authhero/adapter-interfaces").AuthorizationResponseMode | undefined;
58
+ redirect_uri?: string | undefined;
59
+ audience?: string | undefined;
60
+ organization?: string | undefined;
62
61
  nonce?: string | undefined;
62
+ scope?: string | undefined;
63
63
  prompt?: string | undefined;
64
64
  code_challenge_method?: import("@authhero/adapter-interfaces").CodeChallengeMethod | undefined;
65
65
  code_challenge?: string | undefined;
@@ -37,7 +37,7 @@ export declare const authenticationMethodsRoutes: OpenAPIHono<{
37
37
  };
38
38
  } & {
39
39
  json: {
40
- type: "email" | "phone" | "push" | "passkey" | "totp" | "webauthn-roaming" | "webauthn-platform";
40
+ type: "email" | "push" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
41
41
  phone_number?: string | undefined;
42
42
  totp_secret?: string | undefined;
43
43
  credential_id?: string | undefined;
@@ -409,7 +409,7 @@ export declare const brandingRoutes: OpenAPIHono<{
409
409
  } & {
410
410
  json: {
411
411
  body?: string | undefined;
412
- screen?: "identifier" | "signup" | "password" | "login" | undefined;
412
+ screen?: "login" | "identifier" | "signup" | "password" | undefined;
413
413
  branding?: {
414
414
  colors?: {
415
415
  primary: string;
@@ -853,7 +853,7 @@ export declare const connectionRoutes: OpenAPIHono<{
853
853
  };
854
854
  } | {
855
855
  mode: "inline";
856
- status: "error" | "success";
856
+ status: "success" | "error";
857
857
  connection_id: string;
858
858
  connection_name: string;
859
859
  strategy: string;
@@ -30,7 +30,7 @@ export declare const failedEventsRoutes: OpenAPIHono<{
30
30
  log_type: string;
31
31
  category: "user_action" | "admin_action" | "system" | "api";
32
32
  actor: {
33
- type: "client_credentials" | "user" | "system" | "admin" | "api_key";
33
+ type: "user" | "client_credentials" | "api_key" | "system" | "admin";
34
34
  id?: string | undefined;
35
35
  email?: string | undefined;
36
36
  org_id?: string | undefined;
@@ -520,6 +520,8 @@ export declare const formsRoutes: OpenAPIHono<{
520
520
  display_name?: string | undefined;
521
521
  icon_url?: string | undefined;
522
522
  href?: string | undefined;
523
+ last_used?: boolean | undefined;
524
+ last_used_label?: string | undefined;
523
525
  }[] | undefined;
524
526
  } | undefined;
525
527
  } | {
@@ -1121,6 +1123,8 @@ export declare const formsRoutes: OpenAPIHono<{
1121
1123
  display_name?: string | undefined;
1122
1124
  icon_url?: string | undefined;
1123
1125
  href?: string | undefined;
1126
+ last_used?: boolean | undefined;
1127
+ last_used_label?: string | undefined;
1124
1128
  }[] | undefined;
1125
1129
  } | undefined;
1126
1130
  } | {
@@ -1738,6 +1742,8 @@ export declare const formsRoutes: OpenAPIHono<{
1738
1742
  display_name?: string | undefined;
1739
1743
  icon_url?: string | undefined;
1740
1744
  href?: string | undefined;
1745
+ last_used?: boolean | undefined;
1746
+ last_used_label?: string | undefined;
1741
1747
  }[] | undefined;
1742
1748
  } | undefined;
1743
1749
  } | {
@@ -2356,6 +2362,8 @@ export declare const formsRoutes: OpenAPIHono<{
2356
2362
  display_name?: string | undefined;
2357
2363
  icon_url?: string | undefined;
2358
2364
  href?: string | undefined;
2365
+ last_used?: boolean | undefined;
2366
+ last_used_label?: string | undefined;
2359
2367
  }[] | undefined;
2360
2368
  } | undefined;
2361
2369
  } | {
@@ -2955,6 +2963,8 @@ export declare const formsRoutes: OpenAPIHono<{
2955
2963
  display_name?: string | undefined;
2956
2964
  icon_url?: string | undefined;
2957
2965
  href?: string | undefined;
2966
+ last_used?: boolean | undefined;
2967
+ last_used_label?: string | undefined;
2958
2968
  }[] | undefined;
2959
2969
  } | undefined;
2960
2970
  } | {
@@ -3552,6 +3562,8 @@ export declare const formsRoutes: OpenAPIHono<{
3552
3562
  display_name?: string | undefined;
3553
3563
  icon_url?: string | undefined;
3554
3564
  href?: string | undefined;
3565
+ last_used?: boolean | undefined;
3566
+ last_used_label?: string | undefined;
3555
3567
  }[] | undefined;
3556
3568
  } | undefined;
3557
3569
  } | {
@@ -4151,6 +4163,8 @@ export declare const formsRoutes: OpenAPIHono<{
4151
4163
  display_name?: string | undefined;
4152
4164
  icon_url?: string | undefined;
4153
4165
  href?: string | undefined;
4166
+ last_used?: boolean | undefined;
4167
+ last_used_label?: string | undefined;
4154
4168
  }[] | undefined;
4155
4169
  } | undefined;
4156
4170
  } | {
@@ -12,7 +12,7 @@ export declare const guardianRoutes: OpenAPIHono<{
12
12
  };
13
13
  };
14
14
  output: {
15
- name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
15
+ name: "otp" | "email" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
16
16
  enabled: boolean;
17
17
  trial_expired?: boolean | undefined;
18
18
  }[];
@@ -167,7 +167,7 @@ export declare const guardianRoutes: OpenAPIHono<{
167
167
  $get: {
168
168
  input: {
169
169
  param: {
170
- factor_name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
170
+ factor_name: "otp" | "email" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
171
171
  };
172
172
  } & {
173
173
  header: {
@@ -175,7 +175,7 @@ export declare const guardianRoutes: OpenAPIHono<{
175
175
  };
176
176
  };
177
177
  output: {
178
- name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
178
+ name: "otp" | "email" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
179
179
  enabled: boolean;
180
180
  trial_expired?: boolean | undefined;
181
181
  };
@@ -188,7 +188,7 @@ export declare const guardianRoutes: OpenAPIHono<{
188
188
  $put: {
189
189
  input: {
190
190
  param: {
191
- factor_name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
191
+ factor_name: "otp" | "email" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
192
192
  };
193
193
  } & {
194
194
  header: {
@@ -200,7 +200,7 @@ export declare const guardianRoutes: OpenAPIHono<{
200
200
  };
201
201
  };
202
202
  output: {
203
- name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
203
+ name: "otp" | "email" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
204
204
  enabled: boolean;
205
205
  trial_expired?: boolean | undefined;
206
206
  };