Skip to content

Commit

Permalink
fix: search in req.signedCookies (#644) (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
javier-garcia-meteologica authored Aug 20, 2021
1 parent 32d2299 commit 356fb18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewares/openapi.security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class AuthValidator {
throw Error(`query parameter '${scheme.name}' required`);
}
} else if (scheme.in === 'cookie') {
if (!req.cookies[scheme.name]) {
if (!req.cookies[scheme.name] && !req.signedCookies?.[scheme.name]) {
throw Error(`cookie '${scheme.name}' required`);
}
}
Expand Down

0 comments on commit 356fb18

Please sign in to comment.