Comparing version 0.0.0-remove-adapter-package.20240719010000 to 0.0.0-remove-adapter-package.20240719033400
@@ -92,3 +92,3 @@ export function parseCookieHeader(header) { | ||
const maxAge = this.attributes.get("max-age") ?? null; | ||
if (expires !== null) { | ||
if (maxAge !== null) { | ||
options.maxAge = Number(maxAge); | ||
@@ -95,0 +95,0 @@ } |
@@ -1,5 +0,5 @@ | ||
export { Lucia, generateSessionIdWithWebCrypto } from "./lucia.js"; | ||
export { Lucia, generateSessionId } from "./lucia.js"; | ||
export { Cookie } from "./cookie.js"; | ||
export { generateIdFromEntropySizeWithWebCrypto, verifyRequestOrigin } from "./utils.js"; | ||
export { generateIdFromEntropySize, verifyRequestOrigin } from "./utils.js"; | ||
export type { DatabaseAdapter, DatabaseError, LuciaSession, LuciaUser, SessionAndUser } from "./lucia.js"; | ||
export type { NPMCookieOptions } from "./cookie.js"; |
@@ -1,3 +0,3 @@ | ||
export { Lucia, generateSessionIdWithWebCrypto } from "./lucia.js"; | ||
export { Lucia, generateSessionId } from "./lucia.js"; | ||
export { Cookie } from "./cookie.js"; | ||
export { generateIdFromEntropySizeWithWebCrypto, verifyRequestOrigin } from "./utils.js"; | ||
export { generateIdFromEntropySize, verifyRequestOrigin } from "./utils.js"; |
@@ -20,5 +20,5 @@ import { Cookie } from "./cookie.js"; | ||
export declare class DatabaseError extends Error { | ||
constructor(message: string, cause: any); | ||
constructor(message: string, cause: unknown); | ||
} | ||
export declare function generateSessionIdWithWebCrypto(): string; | ||
export declare function generateSessionId(): string; | ||
export interface DatabaseAdapter<_Session extends LuciaSession, _User extends LuciaUser> { | ||
@@ -25,0 +25,0 @@ getSessionAndUser(sessionId: string): Promise<SessionAndUser<_Session, _User>>; |
import { Cookie, parseCookieHeader } from "./cookie.js"; | ||
import { generateIdFromEntropySizeWithWebCrypto } from "./utils.js"; | ||
import { generateIdFromEntropySize } from "./utils.js"; | ||
export class Lucia { | ||
@@ -98,4 +98,4 @@ sessionExpiresInSeconds; | ||
} | ||
export function generateSessionIdWithWebCrypto() { | ||
return generateIdFromEntropySizeWithWebCrypto(25); | ||
export function generateSessionId() { | ||
return generateIdFromEntropySize(25); | ||
} |
export declare function verifyRequestOrigin(origin: string, allowedDomains: string[]): boolean; | ||
export declare function generateIdFromEntropySizeWithWebCrypto(size: number): string; | ||
export declare function generateIdFromEntropySize(size: number): string; |
@@ -28,3 +28,3 @@ import { base32 } from "@oslojs/encoding"; | ||
} | ||
export function generateIdFromEntropySizeWithWebCrypto(size) { | ||
export function generateIdFromEntropySize(size) { | ||
if (size % 5 !== 0) { | ||
@@ -31,0 +31,0 @@ throw new TypeError("Argument 'size' must be a multiple of 5"); |
{ | ||
"name": "lucia", | ||
"version": "0.0.0-remove-adapter-package.20240719010000", | ||
"version": "0.0.0-remove-adapter-package.20240719033400", | ||
"description": "A simple and flexible authentication library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
30933