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-lucia-deps-1695649251 to 0.0.0-remove-adapter-package.20240719010000

dist/cookie.d.ts

72

CHANGELOG.md
# lucia
## 3.2.0
### Minor changes
- [#1548](https://github.com/lucia-auth/lucia/pull/1548) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Add `generateIdFromEntropySize()`
### Patch changes
- [#1546](https://github.com/lucia-auth/lucia/pull/1546) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Fix `options.sessionCookie` parameter type in `Lucia`
- [#1548](https://github.com/lucia-auth/lucia/pull/1548) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Optimize session ID generation
## 3.1.1
- Fix types.
## 3.1.0
- Add option to configure user ID type ([#1472](https://github.com/lucia-auth/lucia/pull/1472)).
## 3.0.1
- Fix `LegacyScrypt` generating malformed hash (see [#1370](https://github.com/lucia-auth/lucia/pull/1370) - no security concerns)
## 3.0.0
See the [migration guide](https://v3.lucia-auth.com/upgrade-v3).
## 2.7.6
### Patch changes
- [#1309](https://github.com/lucia-auth/lucia/pull/1309) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Fix `setCookie()` method in SvelteKit middleware
## 2.7.5
### Patch changes
- [#1301](https://github.com/lucia-auth/lucia/pull/1301) by [@matteopolak](https://github.com/matteopolak) : Update SvelteKit middleware to be compatible with SvelteKit v2
## 2.7.4
### Patch changes
- [#1250](https://github.com/lucia-auth/lucia/pull/1250) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Revert #1158
- [#1256](https://github.com/lucia-auth/lucia/pull/1256) by [@FredTreg](https://github.com/FredTreg) : Allow debug message to be displayed when request origin not available
- [#1254](https://github.com/lucia-auth/lucia/pull/1254) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Remove unused `svelte` field from `package.json`
- [#1250](https://github.com/lucia-auth/lucia/pull/1250) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Remove `nanoid` dependency
## 2.7.3
### Patch changes
- [#1217](https://github.com/lucia-auth/lucia/pull/1217) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Fix `express()` middleware setting incorrect `Max-Age` cookie attribute
- [#1158](https://github.com/lucia-auth/lucia/pull/1158) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Update dependencies
## 2.7.2
### Patch changes
- [#1212](https://github.com/lucia-auth/lucia/pull/1212) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Remove dev dependencies for typing
## 2.7.1
### Patch changes
- [#1171](https://github.com/lucia-auth/lucia/pull/1171) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Add proper attributes for `@noble/hashes`
## 2.7.0

@@ -4,0 +76,0 @@

18

dist/index.d.ts

@@ -1,13 +0,5 @@

export { lucia } from "./auth/index.js";
export { DEFAULT_SESSION_COOKIE_NAME } from "./auth/cookie.js";
export { LuciaError } from "./auth/error.js";
export { createKeyId } from "./auth/database.js";
export type GlobalAuth = Lucia.Auth;
export type GlobalDatabaseUserAttributes = Lucia.DatabaseUserAttributes;
export type GlobalDatabaseSessionAttributes = Lucia.DatabaseSessionAttributes;
export type { User, Key, Session, Configuration, Env, Auth } from "./auth/index.js";
export type { Adapter, InitializeAdapter, UserAdapter, SessionAdapter } from "./auth/adapter.js";
export type { UserSchema, KeySchema, SessionSchema } from "./auth/database.js";
export type { RequestContext, Middleware, AuthRequest } from "./auth/request.js";
export type { Cookie } from "./auth/cookie.js";
export type { LuciaErrorConstructor } from "./auth/error.js";
export { Lucia, generateSessionIdWithWebCrypto } from "./lucia.js";
export { Cookie } from "./cookie.js";
export { generateIdFromEntropySizeWithWebCrypto, verifyRequestOrigin } from "./utils.js";
export type { DatabaseAdapter, DatabaseError, LuciaSession, LuciaUser, SessionAndUser } from "./lucia.js";
export type { NPMCookieOptions } from "./cookie.js";

@@ -1,4 +0,3 @@

export { lucia } from "./auth/index.js";
export { DEFAULT_SESSION_COOKIE_NAME } from "./auth/cookie.js";
export { LuciaError } from "./auth/error.js";
export { createKeyId } from "./auth/database.js";
export { Lucia, generateSessionIdWithWebCrypto } from "./lucia.js";
export { Cookie } from "./cookie.js";
export { generateIdFromEntropySizeWithWebCrypto, verifyRequestOrigin } from "./utils.js";
{
"name": "lucia",
"version": "0.0.0-lucia-deps-1695649251",
"version": "0.0.0-remove-adapter-package.20240719010000",
"description": "A simple and flexible authentication library",

@@ -8,3 +8,2 @@ "main": "dist/index.js",

"module": "dist/index.js",
"svelte": "dist/index.js",
"type": "module",

@@ -21,25 +20,5 @@ "files": [

],
"exports": {
".": "./dist/index.js",
"./middleware": "./dist/middleware/index.js",
"./polyfill/node": "./dist/polyfill/node.js",
"./utils": "./dist/utils/index.js"
},
"typesVersions": {
"*": {
"middleware": [
"dist/middleware/index.d.ts"
],
"polyfill/node": [
"dist/polyfill/node.d.ts"
],
"utils": [
"dist/utils/index.d.ts"
]
}
},
"repository": {
"type": "git",
"url": "https://github.com/pilcrowOnPaper/lucia",
"directory": "packages/lucia"
"url": "https://github.com/lucia-auth/lucia"
},

@@ -49,18 +28,22 @@ "author": "pilcrowonpaper",

"devDependencies": {
"@sveltejs/kit": "1.10.0",
"@types/express": "^4.17.17",
"@types/node": "^18.6.2",
"fastify": "^4.21.0",
"prettier": "^2.3.0",
"vitest": "^0.33.0"
"@eslint/js": "^9.7.0",
"@types/node": "20.x",
"eslint": "^8.57.0",
"prettier": "^2.8.8",
"typescript": "^5.5.3",
"typescript-eslint": "^7.16.1",
"vitest": "^2.0.3"
},
"dependencies": {
"@noble/hashes": "1.3.2"
"@oslojs/encoding": "0.3.0"
},
"engines": {
"node": "20.x",
"pnpm": "*"
},
"scripts": {
"build": "shx rm -rf ./dist/* && tsc",
"auri.build": "pnpm build",
"test": "vitest run",
"test.debug": "vitest run src/utils/debug.test.ts"
"build": "rm -rf dist/* && tsc --project tsconfig.build.json",
"format": "prettier -w .",
"lint": "eslint src"
}
}

@@ -1,15 +0,24 @@

# `lucia`
# Lucia
A simple authentication library for managing users and sessions.
**[Documentation](https://v3.lucia-auth.com)**
**[Documentation](https://lucia-auth.com)**
**[Changelog](https://github.com/pilcrowOnPaper/lucia/blob/main/packages/lucia/CHANGELOG.md)**
An open-source auth library that works alongside your database to provide an API that's easy to use, understand, and extend.
```ts
const sessionId = lucia.parseSessionCookie(cookieHeader);
if (sessionId === null) {
throw new Error("Invalid session");
}
const { session, user } = await lucia.validateSession(sessionId);
if (session === null) {
throw new Error("Invalid session");
}
```
## Installation
```bash
```
npm install lucia
pnpm add lucia
yarn add lucia
```
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