diff --git a/packages/glitch-server/main.ts b/packages/glitch-server/main.ts index 305187c0..54412126 100644 --- a/packages/glitch-server/main.ts +++ b/packages/glitch-server/main.ts @@ -13,7 +13,7 @@ export const handleGlitchRequest = async ( let path = url.pathname; const accessToken = req.headers .get("Cookie") - ?.match(/_mastodon_session=(.*?)(;|$)/)?.[1]; + ?.match(/_session_id=(.*?)(;|$)/)?.[1]; const user = await retrieveUserFromToken(accessToken ?? ""); // Strip leading /web from path diff --git a/server/api/api/auth/mastodon-login/index.ts b/server/api/api/auth/mastodon-login/index.ts index 3a13f55a..0527b66e 100644 --- a/server/api/api/auth/mastodon-login/index.ts +++ b/server/api/api/auth/mastodon-login/index.ts @@ -67,7 +67,7 @@ export default apiRoute( return new Response(null, { headers: { Location: "/", - "Set-Cookie": `_mastodon_session=${accessToken}; Domain=${ + "Set-Cookie": `_session_id=${accessToken}; Domain=${ new URL(config.http.base_url).hostname }; SameSite=Lax; Path=/; HttpOnly`, },