Skip to content

Commit

Permalink
fix: overriding access_token on failure (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Oct 11, 2024
1 parent b85a243 commit a95e56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/oauth/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const load = (async ({ fetch, url: { searchParams, origin }, cookies }) =
headers: { "accept": "application/json", "content-type": "application/json" },
}).then(res => res.json());

cookies.set("access_token", access_token, { path: "/", maxAge: 60 * 60 * 24 * 365 });
access_token && cookies.set("access_token", access_token, { path: "/", maxAge: 60 * 60 * 24 * 365 });

return { access_token, scope };
}) satisfies PageServerLoad;

0 comments on commit a95e56c

Please sign in to comment.