Skip to content

Commit

Permalink
fix: logout functionality
Browse files Browse the repository at this point in the history
Added a logout hbs so the view is actually rendered - CSRF protection for /logout routes
  • Loading branch information
tangit86 committed Dec 13, 2023
1 parent 34710a5 commit b0a589a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ registerErrorRoute(router)
router.use("/consent", doubleCsrfProtection)
router.use("/consent", csrfErrorHandler(invalidCsrfTokenError))


// all routes registered under the /logout path are protected by CSRF
router.use("/logout", doubleCsrfProtection)
router.use("/logout", csrfErrorHandler(invalidCsrfTokenError))

registerConsentRoute(router)
registerLogoutRoute(router)

Expand Down
3 changes: 3 additions & 0 deletions views/logout.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div id="logout">
{{{card}}}
</div>

0 comments on commit b0a589a

Please sign in to comment.