avrodh-session
Advanced tools
Comparing version 6.0.0-3 to 6.0.0-4
@@ -33,3 +33,5 @@ "use strict"; | ||
return { | ||
session, | ||
getSession: function _session() { | ||
return session; | ||
}, | ||
generateToken: async function _generateCsrf() { | ||
@@ -36,0 +38,0 @@ return (0, csrf_1.generateCsrf)(session); |
@@ -49,3 +49,4 @@ "use strict"; | ||
err.message === "Bad hmac value" || | ||
err.message === "Cannot find password: ")) { | ||
err.message === "Cannot find password: " || | ||
err.message === "Incorrect number of sealed components")) { | ||
console.warn("Received error from Iron: %s, session was automatically restarted", err.message); | ||
@@ -68,3 +69,3 @@ // if seal expires or | ||
const store = await getOrCreateStore({ | ||
sealed: cookie_1.default.parse(getRequestCookieHeader())[cookieName], | ||
sealed: cookie_1.default.parse(getRequestCookieHeader() || "")[cookieName], | ||
password, | ||
@@ -71,0 +72,0 @@ ttl: ttl * 1000, |
@@ -9,5 +9,5 @@ import type { Session, SessionInterface, SessionOptions } from "./types.d"; | ||
export declare function initSession(input: SessionInterface, config: Config): Promise<{ | ||
session: Session; | ||
getSession: () => Session; | ||
generateToken: () => Promise<string>; | ||
verifyToken: (token: string) => Promise<boolean>; | ||
}>; |
{ | ||
"name": "avrodh-session", | ||
"version": "6.0.0-3", | ||
"version": "6.0.0-4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Sushant <sushantdhiman@outlook.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9546
234