fix: OAuth flow by setting scope and cookie to 'lax'

This commit is contained in:
wancat committed 2024-04-05 17:56:09 +08:00
1 parent df140c64f8
commit 455fde41ab
5 files changed
+12 -5

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ export default function errorHandler(
req: Request,
res: Response,
// eslint-disable-next-line no-unused-vars
next: NextFunction
_next: NextFunction
) {
logger.error(err) // Log error stack trace to the console
res.status(500).send({ message: 'Something broke!' }) // Send error response
+1 -1
View File
@@ -12,7 +12,7 @@ export default session({
domain: config.domain,
httpOnly: true,
secure: config.protocol === 'https:',
sameSite: 'strict',
sameSite: 'lax',
maxAge: config.sessionMaxAge,
},
store: MongoStore.create({