mirror of
https://github.com/outline/outline.git
synced 2026-11-29 00:29:36 +03:00
fix: Correctly clear accessToken when logging out.
Token is correctly rotated on the server, it just isnt correctly removed on the client. closes #5940
This commit is contained in:
1 parent
0ae4c7d6bd
commit
773c35ebc3
1 file changed
+2
-2
@@ -2,7 +2,7 @@ import { subHours, subMinutes } from "date-fns";
|
||||
import Router from "koa-router";
|
||||
import uniqBy from "lodash/uniqBy";
|
||||
import { TeamPreference } from "@shared/types";
|
||||
import { getCookieDomain, parseDomain } from "@shared/utils/domains";
|
||||
import { parseDomain } from "@shared/utils/domains";
|
||||
import env from "@server/env";
|
||||
import auth from "@server/middlewares/authentication";
|
||||
import { transaction } from "@server/middlewares/transaction";
|
||||
@@ -180,8 +180,8 @@ router.post(
|
||||
);
|
||||
|
||||
ctx.cookies.set("accessToken", "", {
|
||||
sameSite: "lax",
|
||||
expires: subMinutes(new Date(), 1),
|
||||
domain: getCookieDomain(ctx.hostname, env.isCloudHosted),
|
||||
});
|
||||
|
||||
ctx.body = {
|
||||
|
||||
Reference in new issue
Block a user