We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b84811 commit c6c5f3fCopy full SHA for c6c5f3f
src/node/util.ts
@@ -260,9 +260,8 @@ export type IsCookieValidArgs = {
260
}
261
262
/** Checks if a req.cookies.key is valid using the PasswordMethod */
263
-export async function isCookieValid(isCookieValidArgs: IsCookieValidArgs): Promise<boolean> {
+export async function isCookieValid({ passwordFromArgs = "", cookieKey, hashedPasswordFromArgs = "" }: IsCookieValidArgs): Promise<boolean> {
264
let isValid = false
265
- const { passwordFromArgs = "", cookieKey, hashedPasswordFromArgs = "" } = isCookieValidArgs
266
switch (isCookieValidArgs.passwordMethod) {
267
case "PLAIN_TEXT":
268
isValid = await isHashMatch(passwordFromArgs, cookieKey)
0 commit comments