New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 2.7.3 to 2.7.4

dist/scrypt/index.d.ts

12

CHANGELOG.md
# lucia
## 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

@@ -4,0 +16,0 @@

2

dist/auth/request.js

@@ -116,4 +116,2 @@ import { debug } from "../utils/debug.js";

const requestOrigin = request.headers.get("Origin");
if (!requestOrigin)
return false;
if (!requestOrigin) {

@@ -120,0 +118,0 @@ debug.request.fail("No request origin available");

import { LuciaError } from "../auth/error.js";
import { scryptAsync as scrypt } from "@noble/hashes/scrypt";
import { customAlphabet } from "nanoid";
export const generateRandomString = (length, alphabet) => {
const DEFAULT_ALPHABET = "abcdefghijklmnopqrstuvwxyz1234567890";
const customNanoid = customAlphabet(alphabet ?? DEFAULT_ALPHABET);
return customNanoid(length);
import { scrypt } from "../scrypt/index.js";
const DEFAULT_ALPHABET = "abcdefghijklmnopqrstuvwxyz1234567890";
export const generateRandomString = (length, alphabet = DEFAULT_ALPHABET) => {
const randomUint32Values = new Uint32Array(length);
crypto.getRandomValues(randomUint32Values);
const u32Max = 0xffffffff;
let result = "";
for (let i = 0; i < randomUint32Values.length; i++) {
const rand = randomUint32Values[i] / (u32Max + 1);
result += alphabet[Math.floor(alphabet.length * rand)];
}
return result;
};

@@ -9,0 +15,0 @@ export const generateScryptHash = async (s) => {

{
"name": "lucia",
"version": "2.7.3",
"version": "2.7.4",
"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",

@@ -52,6 +51,2 @@ "files": [

},
"dependencies": {
"@noble/hashes": "1.3.2",
"nanoid": "5.0.1"
},
"scripts": {

@@ -58,0 +53,0 @@ "build": "shx rm -rf ./dist/* && tsc",

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