Skip to content

Commit

Permalink
update lax to none in cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
nahyan0077 committed Aug 24, 2024
1 parent e33859c commit dc1f36f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions auth-service/src/presentation/controller/googleAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ export const googleAuthController = (dependancies: IDependancies) => {
res.cookie("access_token", accessToken, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
sameSite: process.env.NODE_ENV === "none",
});

res.cookie("refresh_token", refreshToken, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
sameSite: process.env.NODE_ENV === "none",
});


Expand Down
4 changes: 2 additions & 2 deletions auth-service/src/presentation/controller/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ export const loginController = (dependancies: IDependancies) => {
res.cookie("access_token", accessToken, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
sameSite: "none",
});

res.cookie("refresh_token", refreshToken, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
sameSite: "none",
});

return res.status(200).json({
Expand Down
4 changes: 2 additions & 2 deletions auth-service/src/presentation/controller/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export const signupController = (dependancies: IDependancies) => {
res.cookie("access_token", accessToken, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
sameSite: "none",
});

res.cookie("refresh_token", refreshToken, {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: process.env.NODE_ENV === "production" ? "none" : "lax",
sameSite: "none",
});

res
Expand Down

0 comments on commit dc1f36f

Please sign in to comment.