Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Co-authored-by: Asher <[email protected]>
  • Loading branch information
jsjoeio and code-asher authored Jun 8, 2021
1 parent 1b84811 commit c6c5f3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ export type IsCookieValidArgs = {
}

/** Checks if a req.cookies.key is valid using the PasswordMethod */
export async function isCookieValid(isCookieValidArgs: IsCookieValidArgs): Promise<boolean> {
export async function isCookieValid({ passwordFromArgs = "", cookieKey, hashedPasswordFromArgs = "" }: IsCookieValidArgs): Promise<boolean> {
let isValid = false
const { passwordFromArgs = "", cookieKey, hashedPasswordFromArgs = "" } = isCookieValidArgs
switch (isCookieValidArgs.passwordMethod) {
case "PLAIN_TEXT":
isValid = await isHashMatch(passwordFromArgs, cookieKey)
Expand Down

0 comments on commit c6c5f3f

Please sign in to comment.