Skip to content

Commit

Permalink
docs: update session cookie validation docs for hono (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankParticle committed Mar 26, 2024
1 parent 9428122 commit 5c75981
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pages/guides/validate-session-cookies/hono.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const app = new Hono<{
};
}>();

app.use("*", (c, next) => {
app.use("*", async (c, next) => {
// CSRF middleware
if (c.req.method === "GET") {
return next();
Expand All @@ -38,7 +38,7 @@ app.use("*", (c, next) => {
});

app.use("*", async (c, next) => {
const sessionId = getCookie(lucia.sessionCookieName) ?? null;
const sessionId = getCookie(c, lucia.sessionCookieName) ?? null;
if (!sessionId) {
c.set("user", null);
c.set("session", null);
Expand Down

0 comments on commit 5c75981

Please sign in to comment.