authhero 8.8.0 → 8.8.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.
- package/dist/authhero.cjs +83 -83
- package/dist/authhero.d.ts +196 -211
- package/dist/authhero.mjs +4221 -4217
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +3 -3
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +2 -2
- package/dist/types/helpers/mutable-response.d.ts +15 -3
- package/dist/types/index.d.ts +193 -193
- package/dist/types/routes/auth-api/index.d.ts +26 -26
- 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/auth-api/token.d.ts +10 -10
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/clients.d.ts +7 -7
- package/dist/types/routes/management-api/connections.d.ts +1 -1
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- 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/index.d.ts +162 -162
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +1 -1
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/tenants.d.ts +8 -8
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +2 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- 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/IdToken.d.ts +2 -2
- package/package.json +4 -4
|
@@ -458,7 +458,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
458
458
|
custom_login_page_preview?: string | undefined;
|
|
459
459
|
form_template?: string | undefined;
|
|
460
460
|
addons?: Record<string, any> | undefined;
|
|
461
|
-
token_endpoint_auth_method?: "
|
|
461
|
+
token_endpoint_auth_method?: "none" | "private_key_jwt" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | undefined;
|
|
462
462
|
client_metadata?: Record<string, string> | undefined;
|
|
463
463
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
464
464
|
mobile?: Record<string, any> | undefined;
|
|
@@ -541,8 +541,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
541
541
|
} | undefined;
|
|
542
542
|
authenticated_at?: string | undefined;
|
|
543
543
|
};
|
|
544
|
-
connectionType: "username" | "
|
|
545
|
-
authConnection: "username" | "
|
|
544
|
+
connectionType: "username" | "sms" | "email";
|
|
545
|
+
authConnection: "username" | "sms" | "email";
|
|
546
546
|
session_id: string | undefined;
|
|
547
547
|
authParams: {
|
|
548
548
|
client_id: string;
|
|
@@ -23,11 +23,11 @@ export declare const dcrRequestSchema: z.ZodObject<{
|
|
|
23
23
|
grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
24
|
response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
none: "none";
|
|
27
|
+
private_key_jwt: "private_key_jwt";
|
|
26
28
|
client_secret_post: "client_secret_post";
|
|
27
29
|
client_secret_basic: "client_secret_basic";
|
|
28
|
-
none: "none";
|
|
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>>;
|
|
@@ -13,15 +13,27 @@
|
|
|
13
13
|
* (the body stream is passed through, not copied) and deterministic, so there is
|
|
14
14
|
* nothing to detect.
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* True only for a live WebSocket upgrade — a `101 Switching Protocols` response
|
|
18
|
+
* that carries a non-null `webSocket` handle.
|
|
19
|
+
*
|
|
20
|
+
* The check must NOT be `"webSocket" in res`: the Cloudflare Workers runtime
|
|
21
|
+
* defines a `webSocket` property on *every* `Response` (it is `null` for an
|
|
22
|
+
* ordinary response), so the `in` operator is always true there and would
|
|
23
|
+
* misclassify every response as an upgrade. (In Node / the test runtime the
|
|
24
|
+
* property is absent, so the bug stays invisible to tests.) A real upgrade has
|
|
25
|
+
* a non-null handle, which is what we detect here.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isWebSocketUpgrade(res: Response): boolean;
|
|
16
28
|
/**
|
|
17
29
|
* Return a response whose headers are mutable. A received response is re-wrapped
|
|
18
30
|
* into a fresh `Response` (which has the mutable "response" header guard); an
|
|
19
31
|
* already-mutable response is re-wrapped too, harmlessly, preserving every header
|
|
20
32
|
* already set on it.
|
|
21
33
|
*
|
|
22
|
-
* A
|
|
23
|
-
*
|
|
24
|
-
*
|
|
34
|
+
* A WebSocket upgrade is returned untouched: it carries a `webSocket` handle
|
|
35
|
+
* that reconstruction would drop, breaking the upgrade. Its headers stay
|
|
36
|
+
* immutable, so callers must not write to an upgrade response.
|
|
25
37
|
*/
|
|
26
38
|
export declare function toMutableResponse(res: Response): Response;
|
|
27
39
|
/**
|