From 7d88bb1e137f395aae17c01caf9bc3820b23f384 Mon Sep 17 00:00:00 2001 From: Akhil Reddy Date: Mon, 6 Jan 2025 14:58:09 +0530 Subject: [PATCH] update cookie settings --- src/oauth.ts | 1 + src/utils/errors.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/oauth.ts b/src/oauth.ts index 45cf213..dcd36c0 100644 --- a/src/oauth.ts +++ b/src/oauth.ts @@ -18,6 +18,7 @@ export async function oauth(fastify: FastifyInstance) { "https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration", }, cookie: { + secure: true, sameSite: "none", }, } as FastifyOAuth2Options); diff --git a/src/utils/errors.ts b/src/utils/errors.ts index 50cba16..59853bd 100644 --- a/src/utils/errors.ts +++ b/src/utils/errors.ts @@ -1,4 +1,4 @@ -import { FastifyError, FastifyReply, FastifyRequest } from "fastify"; +import { FastifyReply, FastifyRequest } from "fastify"; import mongoose from "mongoose"; export function errorHandler(