woodpecker soll nun auch das backend deployen
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2025-12-09 13:58:39 +01:00
parent e9a95ccf8d
commit c55e274718
6 changed files with 198 additions and 6 deletions

View File

@ -31,9 +31,8 @@ const authRoute: FastifyPluginAsync = async (fastify) => {
reply.setCookie('oauth_state', state, {
path: '/',
httpOnly: true,
sameSite: 'lax',
// Use HTTPS-based detection to avoid setting Secure on localhost HTTP
secure: !!env.FRONTEND_URL && env.FRONTEND_URL.startsWith('https'),
sameSite: 'none',
secure: true,
maxAge: 10 * 60, // 10 minutes
});
@ -59,7 +58,7 @@ const authRoute: FastifyPluginAsync = async (fastify) => {
// Verify CSRF state from cookie
const expectedState = request.cookies?.oauth_state as string | undefined;
if (!expectedState || state !== expectedState) {
return reply.code(400).send({ error: 'Invalid state parameter' });
return reply.code(400).send({ error: 'Invalid state parameter' });
}
// Clear state cookie