Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lucia

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lucia - npm Package Compare versions

Comparing version 0.0.0-remove-adapter-package.20240719010000 to 0.0.0-remove-adapter-package.20240719033400

2

dist/cookie.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc