@absolutejs/auth 0.56.19 → 0.57.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/agents/index.js +44 -37
- package/dist/agents/index.js.map +7 -7
- package/dist/audit/postgresAuditStore.d.ts +1 -1
- package/dist/audit/types.d.ts +2 -0
- package/dist/audit/wrap.d.ts +4 -2
- package/dist/cli/import/auth0.d.ts +1 -1
- package/dist/cli/import/clerk.d.ts +1 -1
- package/dist/cli/import/lucia.d.ts +1 -1
- package/dist/cli/import/nextauth.d.ts +1 -1
- package/dist/cli/import/types.d.ts +1 -0
- package/dist/cli/migrate.js +91 -47
- package/dist/cli/migrate.js.map +14 -13
- package/dist/client/react.d.ts +21 -21
- package/dist/client/react.js +35 -37
- package/dist/client/react.js.map +6 -6
- package/dist/client/solid.d.ts +21 -21
- package/dist/client/solid.js +24 -24
- package/dist/client/solid.js.map +3 -3
- package/dist/client/svelte.d.ts +21 -21
- package/dist/client/svelte.js +25 -25
- package/dist/client/svelte.js.map +3 -3
- package/dist/client/vue.d.ts +21 -21
- package/dist/client/vue.js +32 -32
- package/dist/client/vue.js.map +3 -3
- package/dist/credentials/import.d.ts +16 -1
- package/dist/credentials/register.d.ts +1 -1
- package/dist/credentials/routes.d.ts +1 -1
- package/dist/fingerprint-client/index.js +4 -3
- package/dist/fingerprint-client/index.js.map +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6416 -262
- package/dist/index.js.map +166 -26
- package/dist/manifest.js +3713 -271
- package/dist/manifest.js.map +30 -4
- package/dist/manifest.json +3 -2
- package/dist/oidc/clientIdMetadata.d.ts +1 -5
- package/dist/oidc/index.js.map +2 -2
- package/dist/oidc/routes.d.ts +1 -1
- package/dist/oidc/vci.d.ts +1 -1
- package/dist/routes/callback.d.ts +1 -1
- package/dist/server.js +6412 -261
- package/dist/server.js.map +166 -26
- package/dist/session/neonStore.d.ts +2 -2
- package/dist/session/redisStore.d.ts +2 -2
- package/dist/session/types.d.ts +2 -0
- package/dist/stores/postgres.d.ts +2 -2
- package/dist/types.d.ts +2 -1
- package/dist/vault/index.js.map +2 -2
- package/dist/webauthn.js +27 -1
- package/dist/webauthn.js.map +3 -3
- package/docs/MIGRATE-FROM-LUCIA.md +19 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthSessionStore } from './types';
|
|
1
|
+
import type { AuthSessionStore, SessionUserDecoder } from './types';
|
|
2
2
|
export declare const authSessionsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3
3
|
name: "auth_sessions";
|
|
4
4
|
schema: undefined;
|
|
@@ -510,4 +510,4 @@ export declare const authSessionSchema: {
|
|
|
510
510
|
}>;
|
|
511
511
|
};
|
|
512
512
|
export type AuthSessionSchema = typeof authSessionSchema;
|
|
513
|
-
export declare const createNeonAuthSessionStore: <UserType>(databaseUrl: string) => AuthSessionStore<UserType>;
|
|
513
|
+
export declare const createNeonAuthSessionStore: <UserType>(databaseUrl: string, decodeUser: SessionUserDecoder<UserType>) => AuthSessionStore<UserType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RedisLike } from '../stores/redis';
|
|
2
|
-
import type { AuthSessionStore } from './types';
|
|
2
|
+
import type { AuthSessionStore, SessionUserDecoder } from './types';
|
|
3
3
|
export type RedisSessionClient = RedisLike & {
|
|
4
4
|
keys: (pattern: string) => Promise<string[]>;
|
|
5
5
|
};
|
|
6
|
-
export declare const createRedisAuthSessionStore: <UserType>(redis: RedisSessionClient, keyPrefix?: string) => AuthSessionStore<UserType>;
|
|
6
|
+
export declare const createRedisAuthSessionStore: <UserType>(redis: RedisSessionClient, decodeUser: SessionUserDecoder<UserType>, keyPrefix?: string) => AuthSessionStore<UserType>;
|
package/dist/session/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { SessionData, UnregisteredSessionData, UserSessionId } from '../types';
|
|
2
|
+
export type SessionUserDecoder<UserType> = (value: unknown) => UserType;
|
|
3
|
+
export declare const decodeSessionUserRecord: (value: unknown) => object;
|
|
2
4
|
export type AuthSessionStore<UserType> = {
|
|
3
5
|
getSession: (id: UserSessionId) => Promise<SessionData<UserType> | undefined>;
|
|
4
6
|
setSession: (id: UserSessionId, value: SessionData<UserType>) => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PgAsyncDatabase } from 'drizzle-orm/pg-core';
|
|
2
|
-
export type AnyPgDatabase = PgAsyncDatabase<
|
|
1
|
+
import type { PgAsyncDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
|
|
2
|
+
export type AnyPgDatabase = PgAsyncDatabase<PgQueryResultHKT>;
|
|
3
3
|
export declare const createNeonDatabase: (databaseUrl: string) => import("drizzle-orm/neon-http").NeonHttpDatabase<import("drizzle-orm").EmptyRelations> & {
|
|
4
4
|
$client: import("@neondatabase/serverless").NeonQueryFunction<false, false>;
|
|
5
5
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CredentialsFor, CustomProviderCredentials, NonEmptyArray, OAuth2Client, OAuth2TokenResponse, ProviderConfig, ProviderOption, ProvidersMap } from 'citra';
|
|
2
2
|
import { Cookie, status as statusType, redirect as redirectType } from 'elysia';
|
|
3
3
|
import { ElysiaCustomStatusResponse } from 'elysia/error';
|
|
4
|
+
import type { StatusMap } from 'elysia/utils';
|
|
4
5
|
import type { ApiKeysConfig } from './apikeys/config';
|
|
5
6
|
import type { AgentAuthConfig } from './agents/config';
|
|
6
7
|
import type { AuditConfig } from './audit/config';
|
|
@@ -122,7 +123,7 @@ export type ResolvedOAuthAuthorization = {
|
|
|
122
123
|
expiresAt?: number;
|
|
123
124
|
tokenType?: string;
|
|
124
125
|
};
|
|
125
|
-
export type StatusReturn = ElysiaCustomStatusResponse<
|
|
126
|
+
export type StatusReturn = Pick<ElysiaCustomStatusResponse<number | keyof StatusMap, unknown>, 'code' | 'response'>;
|
|
126
127
|
export type OnNewUser<UserType> = (userIdentity: Record<string, unknown>) => UserType | StatusReturn | Response | Promise<UserType | StatusReturn | Response>;
|
|
127
128
|
export type GetUser<UserType> = (userIdentity: Record<string, unknown>) => UserType | null | undefined | Promise<UserType | null | undefined>;
|
|
128
129
|
export type CallbackCookie = Record<string, Cookie<unknown>> & {
|