fix: update access token expiration to 1 minute and comment out secure flag
This commit is contained in:
parent
8761c8d5a3
commit
1aca72ac69
2 changed files with 4 additions and 6 deletions
|
|
@ -137,11 +137,11 @@ const refreshAuthToken = async (
|
|||
"accessToken",
|
||||
);
|
||||
response.cookies.set(ACCESS_TOKEN_COOKIE_NAME, newAccessToken, {
|
||||
expires: add(new Date(), { hours: 1 }),
|
||||
expires: add(new Date(), { minutes: 1 }),
|
||||
httpOnly: true,
|
||||
path: "/",
|
||||
sameSite: "lax",
|
||||
secure: env.NODE_ENV === "production",
|
||||
//secure: env.NODE_ENV === "production",
|
||||
});
|
||||
return response;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,10 +50,8 @@ export const api = createTRPCNext<AppRouter>({
|
|||
errorLink,
|
||||
loggerLink({
|
||||
enabled: (opts) =>
|
||||
//(
|
||||
//process.env.NODE_ENV === "development" &&
|
||||
typeof window !== "undefined" ||
|
||||
// )
|
||||
(process.env.NODE_ENV === "development" &&
|
||||
typeof window !== "undefined") ||
|
||||
(opts.direction === "down" && opts.result instanceof Error),
|
||||
}),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue