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.1.0 to 2.2.0

6

CHANGELOG.md
# lucia
## 2.2.0
### Minor changes
- [#944](https://github.com/pilcrowOnPaper/lucia/pull/944) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Add `hono()` middleware
## 2.1.0

@@ -4,0 +10,0 @@

@@ -69,2 +69,11 @@ /// <reference types="node" />

export declare const h3: () => Middleware<[H3Event]>;
type HonoContext = {
req: {
url: string;
method: string;
headers: Headers;
};
header: (name: string, value: string) => void;
};
export declare const hono: () => Middleware<[HonoContext]>;
export {};

@@ -228,1 +228,21 @@ const getIncomingMessageUrl = (incomingMessage, env) => {

};
export const hono = () => {
return ({ args }) => {
const [context] = args;
const requestContext = {
request: {
url: context.req.url,
method: context.req.method,
headers: {
origin: context.req.headers.get("Origin"),
cookie: context.req.headers.get("Cookie"),
authorization: context.req.headers.get("Authorization")
}
},
setCookie: (cookie) => {
context.header("Set-Cookie", cookie.serialize());
}
};
return requestContext;
};
};

2

package.json
{
"name": "lucia",
"version": "2.1.0",
"version": "2.2.0",
"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