Skip to content

Commit 0ec2fe7

Browse files
committed
Nebula: Save auth token for 14d
1 parent ff0cb29 commit 0ec2fe7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

apps/dashboard/src/app/nebula-app/login/auth-actions.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import {
1616
NEBULA_COOKIE_PREFIX_TOKEN,
1717
} from "../_utils/constants";
1818

19+
const FOURTEEN_DAYS_IN_SECONDS = 14 * 24 * 60 * 60;
20+
1921
export async function getNebulaLoginPayload(
2022
params: GenerateLoginPayloadParams,
2123
): Promise<LoginPayload> {
@@ -131,8 +133,7 @@ export async function doNebulaLogin(
131133
httpOnly: true,
132134
secure: true,
133135
sameSite: "strict",
134-
// 3 days
135-
maxAge: 3 * 24 * 60 * 60,
136+
maxAge: FOURTEEN_DAYS_IN_SECONDS,
136137
},
137138
);
138139

@@ -144,8 +145,7 @@ export async function doNebulaLogin(
144145
httpOnly: true,
145146
secure: true,
146147
sameSite: "strict",
147-
// 3 days
148-
maxAge: 3 * 24 * 60 * 60,
148+
maxAge: FOURTEEN_DAYS_IN_SECONDS,
149149
},
150150
);
151151

@@ -209,8 +209,7 @@ export async function isNebulaLoggedIn(address: string) {
209209
httpOnly: false,
210210
secure: true,
211211
sameSite: "strict",
212-
// 3 days
213-
maxAge: 3 * 24 * 60 * 60,
212+
maxAge: FOURTEEN_DAYS_IN_SECONDS,
214213
});
215214
return true;
216215
}

0 commit comments

Comments
 (0)