fix(oidc): invalidate when email not verified

pull/2792/head
Jakob Ankarhem 3 years ago committed by Jakob Ankarhem
parent 079b84c5ea
commit afeefec9e1
No known key found for this signature in database
GPG Key ID: 149CBB661002B3BE

@ -514,6 +514,7 @@ authRoutes.get('/oidc-callback', async (req, res, next) => {
oidcClientId: oidcClientId,
oidcDomain: oidcDomain,
});
await jwtSchema.validate(decoded);
} catch {
logger.info('Failed OIDC login attempt', {
@ -534,6 +535,7 @@ authRoutes.get('/oidc-callback', async (req, res, next) => {
ip: req.ip,
email: decoded.email,
});
return res.redirect('/login');
}
const userRepository = getRepository(User);

Loading…
Cancel
Save