Merge pull request #4826 from Infisical/saml-mfa-patch

only set JID token for non-saml SSO
This commit is contained in:
Andre
2025-11-06 23:28:40 -05:00
committed by GitHub
@@ -550,12 +550,14 @@ export const registerSsoRouter = async (server: FastifyZodProvider) => {
providerAuthToken: req.body.providerAuthToken providerAuthToken: req.body.providerAuthToken
}); });
if ([AuthMethod.GOOGLE, AuthMethod.GITHUB, AuthMethod.GITLAB].includes(data.decodedProviderToken.authMethod)) {
void res.setCookie("jid", data.token.refresh, { void res.setCookie("jid", data.token.refresh, {
httpOnly: true, httpOnly: true,
path: "/", path: "/",
sameSite: "strict", sameSite: "strict",
secure: appCfg.HTTPS_ENABLED secure: appCfg.HTTPS_ENABLED
}); });
}
addAuthOriginDomainCookie(res); addAuthOriginDomainCookie(res);