fix(oidc): allow insecure state cookie when using http

pull/2792/head
Jakob Ankarhem 2 years ago
parent 6e899480d5
commit 66fac20465
No known key found for this signature in database
GPG Key ID: 149CBB661002B3BE

@ -421,7 +421,7 @@ authRoutes.get('/oidc-login', async (req, res, next) => {
res.cookie('oidc-state', state, { res.cookie('oidc-state', state, {
maxAge: 60000, maxAge: 60000,
httpOnly: true, httpOnly: true,
secure: true, secure: req.protocol === 'https',
}); });
return res.redirect(redirectUrl); return res.redirect(redirectUrl);
}); });

Loading…
Cancel
Save