feat(ENG-3247): add auth origin domain cookie on token creation (#4187)

* feat(ENG-3247): add auth origin domain cookie to multiple routers and update Nginx config
This commit is contained in:
Sid
2025-07-18 01:18:25 +05:30
committed by GitHub
parent 1c20e4fef0
commit bc98c42c79
8 changed files with 61 additions and 1 deletions
@@ -22,6 +22,7 @@ import { logger } from "@app/lib/logger";
import { ms } from "@app/lib/ms";
import { fetchGithubEmails, fetchGithubUser } from "@app/lib/requests/github";
import { authRateLimit } from "@app/server/config/rateLimiter";
import { addAuthOriginDomainCookie } from "@app/server/lib/cookie";
import { AuthMethod } from "@app/services/auth/auth-type";
import { OrgAuthMethod } from "@app/services/org/org-types";
import { getServerCfg } from "@app/services/super-admin/super-admin-service";
@@ -475,6 +476,8 @@ export const registerSsoRouter = async (server: FastifyZodProvider) => {
secure: appCfg.HTTPS_ENABLED
});
addAuthOriginDomainCookie(res);
return {
encryptionVersion: data.user.encryptionVersion,
token: data.token.access,