authhero 8.9.0 → 8.9.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/widget/index.esm.js +1 -1
- package/dist/authhero.cjs +109 -109
- package/dist/authhero.d.ts +144 -131
- package/dist/authhero.mjs +8109 -7979
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/password.d.ts +10 -1
- package/dist/types/authentication-flows/passwordless.d.ts +5 -5
- package/dist/types/helpers/avatar.d.ts +6 -0
- package/dist/types/index.d.ts +144 -131
- package/dist/types/routes/auth-api/avatars.d.ts +18 -0
- package/dist/types/routes/auth-api/index.d.ts +47 -34
- package/dist/types/routes/auth-api/passwordless.d.ts +16 -16
- 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 +13 -13
- package/dist/types/routes/management-api/clients.d.ts +8 -8
- package/dist/types/routes/management-api/connections.d.ts +15 -15
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/failed-events.d.ts +1 -1
- 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 +94 -94
- package/dist/types/routes/management-api/log-streams.d.ts +6 -6
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/organizations.d.ts +3 -3
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/tenants.d.ts +6 -6
- package/dist/types/routes/management-api/themes.d.ts +6 -6
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +8 -8
- package/dist/types/routes/universal-login/u2-index.d.ts +3 -3
- package/dist/types/routes/universal-login/u2-routes.d.ts +3 -3
- package/package.json +5 -5
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { Context } from "hono";
|
|
2
|
-
import { AuthParams, LoginSession } from "@authhero/adapter-interfaces";
|
|
2
|
+
import { AuthParams, LoginSession, User } from "@authhero/adapter-interfaces";
|
|
3
3
|
import { EnrichedClient } from "../helpers/client";
|
|
4
4
|
import { Bindings, GrantFlowUserResult, Variables } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Clear the failed-login counter for a user. Failed logins are always
|
|
7
|
+
* recorded on the primary account (see {@link recordFailedLogin}), so this
|
|
8
|
+
* resolves the linked primary before clearing. Called on a successful
|
|
9
|
+
* password login and after a successful password reset — both are strong
|
|
10
|
+
* evidence the legitimate account owner is back in control, so a stale
|
|
11
|
+
* lockout shouldn't block them.
|
|
12
|
+
*/
|
|
13
|
+
export declare function clearFailedLogins(data: Bindings["data"], tenantId: string, user: User): Promise<void>;
|
|
5
14
|
export declare function passwordGrant(ctx: Context<{
|
|
6
15
|
Bindings: Bindings;
|
|
7
16
|
Variables: Variables;
|
|
@@ -367,7 +367,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
367
367
|
active?: boolean | undefined;
|
|
368
368
|
} | undefined;
|
|
369
369
|
signup?: {
|
|
370
|
-
status?: "optional" | "
|
|
370
|
+
status?: "optional" | "required" | "disabled" | undefined;
|
|
371
371
|
verification?: {
|
|
372
372
|
active?: boolean | undefined;
|
|
373
373
|
} | undefined;
|
|
@@ -384,7 +384,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
384
384
|
active?: boolean | undefined;
|
|
385
385
|
} | undefined;
|
|
386
386
|
signup?: {
|
|
387
|
-
status?: "optional" | "
|
|
387
|
+
status?: "optional" | "required" | "disabled" | undefined;
|
|
388
388
|
} | undefined;
|
|
389
389
|
validation?: {
|
|
390
390
|
max_length?: number | undefined;
|
|
@@ -401,7 +401,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
401
401
|
active?: boolean | undefined;
|
|
402
402
|
} | undefined;
|
|
403
403
|
signup?: {
|
|
404
|
-
status?: "optional" | "
|
|
404
|
+
status?: "optional" | "required" | "disabled" | undefined;
|
|
405
405
|
} | undefined;
|
|
406
406
|
} | undefined;
|
|
407
407
|
} | undefined;
|
|
@@ -541,8 +541,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
541
541
|
} | undefined;
|
|
542
542
|
authenticated_at?: string | undefined;
|
|
543
543
|
};
|
|
544
|
-
connectionType: "
|
|
545
|
-
authConnection: "
|
|
544
|
+
connectionType: "username" | "email" | "sms";
|
|
545
|
+
authConnection: "username" | "email" | "sms";
|
|
546
546
|
session_id: string | undefined;
|
|
547
547
|
authParams: {
|
|
548
548
|
client_id: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { User } from "@authhero/adapter-interfaces";
|
|
2
|
+
export declare function getAvatarColor(seed: string): string;
|
|
3
|
+
export declare function getAvatarInitials(user: Partial<User>): string;
|
|
4
|
+
export declare function getDefaultUserPicture(issuer: string, user: Partial<User>): string;
|
|
5
|
+
export declare function withDefaultPicture<T extends Partial<User>>(user: T, issuer: string): T;
|
|
6
|
+
export declare function renderAvatarSvg(text: string, bg: string): string;
|