mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
chore: post-2.0 QA hygiene across api hardening and qa metadata
This commit is contained in:
@@ -413,6 +413,19 @@ export async function authRoutes(app: FastifyInstance): Promise<void> {
|
||||
// MFA plugin not loaded
|
||||
}
|
||||
|
||||
const cookieReply = reply as FastifyReply & {
|
||||
setCookie?: (name: string, value: string, opts: Record<string, unknown>) => FastifyReply;
|
||||
};
|
||||
if (typeof cookieReply.setCookie === "function") {
|
||||
cookieReply.setCookie("snapotter-session", token, {
|
||||
path: "/",
|
||||
httpOnly: true,
|
||||
sameSite: "strict",
|
||||
secure: env.EXTERNAL_URL.startsWith("https"),
|
||||
maxAge: SESSION_DURATION_MS / 1000,
|
||||
});
|
||||
}
|
||||
|
||||
return reply.send({
|
||||
token,
|
||||
user: {
|
||||
|
||||
Reference in New Issue
Block a user