@a-type/auth
Advanced tools
Comparing version
@@ -25,6 +25,6 @@ export interface Session { | ||
getSession: (req: Request) => Promise<Session | null>; | ||
updateSession: (session: Session) => Promise<HeadersInit>; | ||
clearSession: () => HeadersInit; | ||
updateSession: (session: Session) => Promise<Record<string, string>>; | ||
clearSession: () => Record<string, string>; | ||
private getShortName; | ||
private getLongName; | ||
} |
{ | ||
"name": "@a-type/auth", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "My personal auth request handlers", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.js", |
@@ -76,3 +76,3 @@ import { SignJWT, jwtVerify } from 'jose'; | ||
updateSession = async (session: Session): Promise<HeadersInit> => { | ||
updateSession = async (session: Session): Promise<Record<string, string>> => { | ||
const builder = new SignJWT( | ||
@@ -103,3 +103,3 @@ Object.fromEntries( | ||
clearSession = (): HeadersInit => { | ||
clearSession = (): Record<string, string> => { | ||
return { | ||
@@ -106,0 +106,0 @@ 'Set-Cookie': `${this.options.cookieName}=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0`, |
Sorry, the diff of this file is not supported yet
66256
0.07%