This commit is contained in:
parent
bc010c94ff
commit
c53f2bfbc9
@ -118,18 +118,18 @@ export class AuthService {
|
||||
}
|
||||
|
||||
getCookieOptions(isRefreshToken = false) {
|
||||
const isProduction =
|
||||
this.configService.get<string>("NODE_ENV") === "production";
|
||||
const cookieSecure =
|
||||
this.configService.get<string>("COOKIE_SECURE") === "true";
|
||||
const domain = this.configService.get<string>("COOKIE_DOMAIN");
|
||||
// const isProduction =
|
||||
// this.configService.get<string>("NODE_ENV") === "production";
|
||||
// const cookieSecure =
|
||||
// this.configService.get<string>("COOKIE_SECURE") === "true";
|
||||
// const domain = this.configService.get<string>("COOKIE_DOMAIN");
|
||||
|
||||
return {
|
||||
httpOnly: true,
|
||||
secure: isProduction || cookieSecure,
|
||||
// secure: isProduction || cookieSecure,
|
||||
sameSite: "none" as const,
|
||||
path: isRefreshToken ? "/auth/refresh" : "/",
|
||||
domain: domain,
|
||||
// domain: domain,
|
||||
maxAge: isRefreshToken ? 7 * 24 * 60 * 60 * 1000 : 15 * 60 * 1000,
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user