Skip to content

Commit

Permalink
chore(docs): update sign-out example in session management to redirec…
Browse files Browse the repository at this point in the history
…t to home
  • Loading branch information
kingdavidHub committed Jan 4, 2025
1 parent 929070a commit 4f1abd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pages/getting-started/session-management/login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,13 @@ export default component$(() => {
<Code.Express>
```ts filename="src/routes/auth.ts"
import express, { Request, Response } from "express";
import { signIn } from "../auth";
import { signOut } from "../auth";
const router = express.Router()

router.post("/auth/signout", async (req: Request, res: Response) => {
try {
await signOut(req, res)
res.redirect("/dashboard")
res.redirect("/")
} catch (error) {
res.status(500).send("Sign out failed")
}
Expand Down

0 comments on commit 4f1abd3

Please sign in to comment.