mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 08:27:53 +00:00
Merge pull request #4826 from Infisical/saml-mfa-patch
only set JID token for non-saml SSO
This commit is contained in:
@@ -550,12 +550,14 @@ export const registerSsoRouter = async (server: FastifyZodProvider) => {
|
|||||||
providerAuthToken: req.body.providerAuthToken
|
providerAuthToken: req.body.providerAuthToken
|
||||||
});
|
});
|
||||||
|
|
||||||
void res.setCookie("jid", data.token.refresh, {
|
if ([AuthMethod.GOOGLE, AuthMethod.GITHUB, AuthMethod.GITLAB].includes(data.decodedProviderToken.authMethod)) {
|
||||||
httpOnly: true,
|
void res.setCookie("jid", data.token.refresh, {
|
||||||
path: "/",
|
httpOnly: true,
|
||||||
sameSite: "strict",
|
path: "/",
|
||||||
secure: appCfg.HTTPS_ENABLED
|
sameSite: "strict",
|
||||||
});
|
secure: appCfg.HTTPS_ENABLED
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
addAuthOriginDomainCookie(res);
|
addAuthOriginDomainCookie(res);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user