authhero 9.28.0 → 9.28.2
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/js/client.js +1 -1
- package/dist/authhero.cjs +106 -106
- package/dist/authhero.d.ts +316 -316
- package/dist/authhero.mjs +13970 -13945
- package/dist/client.js +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/connection.d.ts +2 -1
- package/dist/types/authentication-flows/passwordless.d.ts +4 -4
- package/dist/types/authentication-flows/universal.d.ts +4 -1
- package/dist/types/client/client-bundle.d.ts +1 -1
- package/dist/types/helpers/logging.d.ts +7 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/index.d.ts +316 -316
- package/dist/types/routes/auth-api/account.d.ts +2 -2
- package/dist/types/routes/auth-api/index.d.ts +25 -25
- package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
- package/dist/types/routes/auth-api/passwordless.d.ts +12 -12
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/management-api/action-triggers.d.ts +2 -2
- 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 +15 -15
- package/dist/types/routes/management-api/client-grants.d.ts +9 -9
- package/dist/types/routes/management-api/clients.d.ts +8 -8
- 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/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/flows.d.ts +8 -8
- package/dist/types/routes/management-api/forms.d.ts +144 -144
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/index.d.ts +276 -276
- package/dist/types/routes/management-api/keys.d.ts +12 -12
- package/dist/types/routes/management-api/log-streams.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +6 -6
- package/dist/types/routes/management-api/prompts.d.ts +6 -6
- package/dist/types/routes/management-api/roles.d.ts +6 -6
- package/dist/types/routes/management-api/rollouts.d.ts +6 -6
- package/dist/types/routes/management-api/tenant-operations.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +16 -16
- package/dist/types/routes/management-api/themes.d.ts +9 -9
- package/dist/types/routes/management-api/users.d.ts +12 -12
- package/dist/types/routes/saml/index.d.ts +6 -6
- package/dist/types/routes/saml/samlp.d.ts +6 -6
- package/dist/types/routes/universal-login/common.d.ts +12 -12
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/impersonate.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +4 -4
- 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/state-machines/login-session.d.ts +3 -1
- package/dist/types/utils/cookies.d.ts +50 -9
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type PasswordResetFlow } from "./password-reset";
|
|
2
2
|
import { LoginSession, LoginSessionState } from "@authhero/adapter-interfaces";
|
|
3
|
+
import type { SessionCookieDiagnostics } from "../utils/cookies";
|
|
3
4
|
/** Persisted context, grouped by responsibility in types, flat on disk. */
|
|
4
5
|
export interface LoginSessionData {
|
|
5
6
|
passwordReset?: PasswordResetFlow;
|
|
@@ -28,6 +29,7 @@ export interface LoginSessionData {
|
|
|
28
29
|
ready?: boolean;
|
|
29
30
|
};
|
|
30
31
|
try_connection_result?: unknown;
|
|
32
|
+
session_cookie?: SessionCookieDiagnostics;
|
|
31
33
|
}
|
|
32
34
|
/** The on-disk JSON shape stays flat for compatibility with existing sessions. */
|
|
33
35
|
export declare function readLoginSessionData(raw?: string | null): LoginSessionData;
|
|
@@ -209,7 +211,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
|
|
|
209
211
|
}, {
|
|
210
212
|
type: "passwordResetRequested";
|
|
211
213
|
params: unknown;
|
|
212
|
-
}, never, "
|
|
214
|
+
}, never, "expired" | "pending" | "authenticated" | "failed" | "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, {
|
|
213
215
|
id: "loginSession";
|
|
214
216
|
states: {
|
|
215
217
|
readonly pending: {};
|
|
@@ -11,21 +11,62 @@
|
|
|
11
11
|
export declare function getAllAuthCookies(tenant_id: string, cookieHeaders?: string): string[];
|
|
12
12
|
export declare function getAuthCookie(tenant_id: string, cookieHeaders?: string): string | undefined;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Clears both non-partitioned and partitioned cookies to ensure clean migration.
|
|
18
|
-
* Returns an array of Set-Cookie headers.
|
|
14
|
+
* Clears both the non-partitioned and the partitioned session cookie (see
|
|
15
|
+
* serializeAuthCookie). Returns an array of Set-Cookie headers.
|
|
19
16
|
*/
|
|
20
17
|
export declare function clearAuthCookie(tenant_id: string, hostname?: string): string[];
|
|
21
18
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* Sets the session cookie twice, with the same name and value: once
|
|
20
|
+
* non-partitioned and once partitioned (CHIPS). Browsers store them as two
|
|
21
|
+
* separate cookies. Returns an array of Set-Cookie headers.
|
|
22
|
+
*
|
|
23
|
+
* - The non-partitioned cookie covers top-level navigations to /authorize
|
|
24
|
+
* (redirect login, cross-site links/302s into login) and same-site iframes.
|
|
25
|
+
* Some Safari configurations do not send a partitioned cookie on a
|
|
26
|
+
* top-level /authorize reached through a cross-site redirect (issue #1639).
|
|
27
|
+
* - The partitioned cookie covers logins and silent auth inside a cross-site
|
|
28
|
+
* iframe (u2 embed mode) once third-party cookies are blocked, where the
|
|
29
|
+
* non-partitioned cookie is rejected.
|
|
24
30
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
31
|
+
* Both are SameSite=None so the session also reaches cross-site POSTs to the
|
|
32
|
+
* login domain (SAML HTTP-POST binding, POST /authorize). Readers must try
|
|
33
|
+
* every value (getAllAuthCookies), since the two jars can hold different
|
|
34
|
+
* sessions. See apps/docs/architecture/session-cookies.md.
|
|
27
35
|
*/
|
|
28
36
|
export declare function serializeAuthCookie(tenant_id: string, value: string, hostname?: string): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Compact snapshot of what the browser sent on an /authorize request, stored
|
|
39
|
+
* on the login session and attached to the resulting login log. A dropped
|
|
40
|
+
* session cookie otherwise leaves no trace: the user just sees the login form.
|
|
41
|
+
* Keep it small — Analytics Engine caps a log's details at 1024 bytes.
|
|
42
|
+
*/
|
|
43
|
+
export type SessionCookieDiagnostics = {
|
|
44
|
+
/** Number of session-cookie values sent (0, 1, or 2 when both jars are). */
|
|
45
|
+
received: number;
|
|
46
|
+
/** Outcome of looking the values up. */
|
|
47
|
+
result: "none" | "not_found" | "revoked" | "expired" | "valid" | "sso_disabled";
|
|
48
|
+
/** Total number of cookies in the Cookie header. */
|
|
49
|
+
cookies: number;
|
|
50
|
+
/** Whether the non-partitioned, SameSite=Lax last-used cookie was sent. */
|
|
51
|
+
last_used?: boolean;
|
|
52
|
+
/** Sec-Fetch-Site / Sec-Fetch-Dest / Sec-Fetch-Storage-Access, if sent. */
|
|
53
|
+
fetch_site?: string;
|
|
54
|
+
fetch_dest?: string;
|
|
55
|
+
storage_access?: string;
|
|
56
|
+
/** Host of the Referer, never the full URL. */
|
|
57
|
+
referrer?: string;
|
|
58
|
+
};
|
|
59
|
+
export declare function getSessionCookieDiagnostics(tenant_id: string, headers: {
|
|
60
|
+
header(name: string): string | undefined;
|
|
61
|
+
}, received: number, result: SessionCookieDiagnostics["result"]): SessionCookieDiagnostics;
|
|
62
|
+
/**
|
|
63
|
+
* Private-browsing result reported by the login page's client script
|
|
64
|
+
* (detectincognitojs). The server can't detect private browsing itself, so
|
|
65
|
+
* the script writes this short-lived, non-HttpOnly cookie on the login host
|
|
66
|
+
* and the login log reads it back. Must match client/incognito-handler.ts.
|
|
67
|
+
*/
|
|
68
|
+
export declare const PRIVATE_BROWSING_COOKIE_NAME = "authhero-private-browsing";
|
|
69
|
+
export declare function getPrivateBrowsingCookie(cookieHeaders?: string): boolean | undefined;
|
|
29
70
|
/**
|
|
30
71
|
* "Last used" connection hint (opt-in via promptSettings.show_last_used_connection).
|
|
31
72
|
*
|
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.28.
|
|
14
|
+
"version": "9.28.2",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"qrcode": "^1.5.4",
|
|
82
82
|
"sanitize-html": "^2.17.4",
|
|
83
83
|
"xstate": "^5.31.1",
|
|
84
|
+
"@authhero/saml": "0.6.4",
|
|
84
85
|
"@authhero/adapter-interfaces": "4.25.0",
|
|
85
|
-
"@authhero/proxy": "0.11.11"
|
|
86
|
-
"@authhero/saml": "0.6.4"
|
|
86
|
+
"@authhero/proxy": "0.11.11"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@authhero/widget": "
|
|
89
|
+
"@authhero/widget": ">=0.38.9",
|
|
90
90
|
"@hono/zod-openapi": "^1.4.0",
|
|
91
91
|
"hono": "^4.8.7",
|
|
92
92
|
"ua-parser-js": "^2.0.0"
|