authhero 8.27.0 → 9.1.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.
- package/LICENSE +661 -21
- package/dist/assets/u/js/client.js +2 -2
- package/dist/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/assets/u/widget/{p-52a70476.entry.js → p-cdfc4555.entry.js} +1 -1
- package/dist/assets/u/widget/{p-f6babd26.entry.js → p-eca60302.entry.js} +1 -1
- package/dist/authhero.cjs +268 -251
- package/dist/authhero.d.ts +186 -95
- package/dist/authhero.mjs +26150 -18257
- package/dist/client.js +2 -2
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +4 -3
- package/dist/types/client/client-bundle.d.ts +1 -1
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/generated/locale-types.d.ts +2 -0
- package/dist/types/helpers/client.d.ts +2 -2
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/link-candidates.d.ts +28 -0
- package/dist/types/helpers/logging.d.ts +8 -0
- package/dist/types/helpers/revoke-user-sessions.d.ts +15 -0
- package/dist/types/helpers/scim/default-mapping.d.ts +10 -0
- package/dist/types/helpers/scim/discovery.d.ts +49 -0
- package/dist/types/helpers/scim/filter.d.ts +58 -0
- package/dist/types/helpers/scim/mint-token.d.ts +11 -0
- package/dist/types/helpers/scim/patch.d.ts +23 -0
- package/dist/types/helpers/scim/responses.d.ts +36 -0
- package/dist/types/helpers/scim/user-mapping.d.ts +76 -0
- package/dist/types/helpers/scopes-permissions.d.ts +18 -0
- package/dist/types/helpers/signing-keys.d.ts +36 -0
- package/dist/types/helpers/users.d.ts +116 -1
- package/dist/types/hooks/codehooks.d.ts +9 -1
- package/dist/types/hooks/helpers/post-login-account-linking.d.ts +52 -0
- package/dist/types/hooks/pre-defined/account-linking.d.ts +20 -0
- package/dist/types/hooks/user-registration.d.ts +1 -0
- package/dist/types/index.d.ts +121 -91
- package/dist/types/middlewares/scim-auth.d.ts +19 -0
- package/dist/types/routes/auth-api/index.d.ts +34 -34
- package/dist/types/routes/auth-api/passwordless.d.ts +16 -16
- 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/action-executions.d.ts +1 -1
- 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 +1 -1
- package/dist/types/routes/management-api/clients.d.ts +8 -8
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/failed-events.d.ts +2 -1
- package/dist/types/routes/management-api/forms.d.ts +14 -0
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/index.d.ts +76 -50
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/organizations.d.ts +1 -1
- package/dist/types/routes/management-api/prompts.d.ts +6 -4
- package/dist/types/routes/management-api/scim.d.ts +187 -0
- package/dist/types/routes/management-api/tenants.d.ts +1 -1
- package/dist/types/routes/management-api/users-by-email.d.ts +1 -0
- package/dist/types/routes/management-api/users.d.ts +13 -5
- package/dist/types/routes/scim/index.d.ts +6 -0
- package/dist/types/routes/universal-login/common.d.ts +3 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
- package/dist/types/routes/universal-login/screens/types.d.ts +9 -0
- 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/AuthError.d.ts +1 -1
- package/dist/types/types/Hooks.d.ts +8 -1
- package/dist/types/utils/cookies.d.ts +11 -0
- package/package.json +7 -6
|
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
165
165
|
$get: {
|
|
166
166
|
input: {
|
|
167
167
|
param: {
|
|
168
|
-
screen: "
|
|
168
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
184
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
200
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
220
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
238
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
173
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
189
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
205
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "account" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
225
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "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";
|
|
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: "
|
|
243
|
+
screen: "login" | "signup" | "consent" | "reset-password" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "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";
|
|
244
244
|
};
|
|
245
245
|
} & {
|
|
246
246
|
query: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTPException } from "hono/http-exception";
|
|
2
2
|
import { ContentfulStatusCode } from "hono/utils/http-status";
|
|
3
|
-
export type HttpExceptionCode = "EMAIL_NOT_VERIFIED" | "INVALID_PASSWORD" | "USER_NOT_FOUND" | "TOO_MANY_FAILED_LOGINS" | "TOO_MANY_REQUESTS";
|
|
3
|
+
export type HttpExceptionCode = "EMAIL_NOT_VERIFIED" | "INVALID_PASSWORD" | "USER_NOT_FOUND" | "USER_BLOCKED" | "TOO_MANY_FAILED_LOGINS" | "TOO_MANY_REQUESTS";
|
|
4
4
|
export type HttpExceptionOptions = {
|
|
5
5
|
code: HttpExceptionCode;
|
|
6
6
|
res?: Response;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthorizationResponseMode, AuthorizationResponseType, DataAdapters, RolePermissionInsert, User } from "@authhero/adapter-interfaces";
|
|
1
|
+
import { AuthorizationResponseMode, AuthorizationResponseType, DataAdapters, LinkCandidate, RolePermissionInsert, User } from "@authhero/adapter-interfaces";
|
|
2
2
|
import { EnrichedClient } from "../helpers/client";
|
|
3
3
|
import { Context } from "hono";
|
|
4
4
|
import { Bindings } from "./Bindings";
|
|
@@ -116,6 +116,13 @@ export type HookEvent = {
|
|
|
116
116
|
ja3?: string;
|
|
117
117
|
ja4?: string;
|
|
118
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* Candidate primary accounts the built-in email-linking policy would consider,
|
|
121
|
+
* exposed only to `post-user-login` code hooks that opt in via
|
|
122
|
+
* `metadata.resolve_link_candidates`. Absent on the event for every other hook
|
|
123
|
+
* (and trigger).
|
|
124
|
+
*/
|
|
125
|
+
link_candidates?: LinkCandidate[];
|
|
119
126
|
};
|
|
120
127
|
export type TokenAPI = {
|
|
121
128
|
createServiceToken: (params: {
|
|
@@ -26,3 +26,14 @@ export declare function clearAuthCookie(tenant_id: string, hostname?: string): s
|
|
|
26
26
|
* Returns an array of Set-Cookie headers.
|
|
27
27
|
*/
|
|
28
28
|
export declare function serializeAuthCookie(tenant_id: string, value: string, hostname?: string): string[];
|
|
29
|
+
/**
|
|
30
|
+
* "Last used" connection hint (opt-in via promptSettings.show_last_used_connection).
|
|
31
|
+
*
|
|
32
|
+
* Stores only the connection name — no PII, no fingerprint. Read server-side
|
|
33
|
+
* on the identifier/login screens to badge the matching connection button,
|
|
34
|
+
* so it stays `httpOnly`. SameSite=Lax (not None): it is only read on
|
|
35
|
+
* top-level navigations to the login page, never inside the silent-auth
|
|
36
|
+
* iframe, and Lax also lets it survive without `partitioned`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getLastUsedConnectionCookie(tenant_id: string, cookieHeaders?: string): string | undefined;
|
|
39
|
+
export declare function serializeLastUsedConnectionCookie(tenant_id: string, connectionName: string, hostname?: string): string;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "9.1.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/
|
|
67
|
-
"@authhero/
|
|
66
|
+
"@authhero/kysely-adapter": "12.1.0",
|
|
67
|
+
"@authhero/widget": "0.36.0"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@peculiar/x509": "^1.14.0",
|
|
@@ -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/
|
|
85
|
-
"@authhero/proxy": "0.
|
|
86
|
-
"@authhero/
|
|
84
|
+
"@authhero/adapter-interfaces": "4.4.0",
|
|
85
|
+
"@authhero/proxy": "0.10.1",
|
|
86
|
+
"@authhero/saml": "0.5.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@authhero/widget": "^0.1.0",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"optional": true
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
+
"license": "AGPL-3.0-only",
|
|
105
106
|
"scripts": {
|
|
106
107
|
"dev": "bun --watch src/bun.ts",
|
|
107
108
|
"build": "pnpm build:i18n && pnpm build:emails && pnpm build:tailwind && pnpm build:client && tsc -p tsconfig.types.json && vite build && rollup -c rollup.dts.config.mjs && pnpm build:assets",
|