Add Logout logic #145

Merged
KattisLej merged 2 commits from 11-logout-logic into develop 2026-08-06 22:27:25 +00:00
KattisLej commented 2026-08-05 14:30:06 +00:00 (Migrated from github.com)

This PR closes #11 to add the log out functionality.

Type of change

  • New feature (non-breaking change which adds functionality)

List of changes made

  • New log out action with redirect to the log in page using replace to prevent user to go back with the browser buttons
  • Functions in session and session manager to clear the session cookie
  • Tests to verify the functionality

Testing

Use the log out button from the menu.

Definition of Done checklist

  • I have made an effort making the commit history understandable
  • I have performed a self-review of my own code and commented any hard-to-understand areas
  • Existing tests are passing and I wrote unit tests for new functionality
  • My changes generate no new warnings
  • Make sure the layout and text follow design sketches, if there are any
  • All Acceptance Criteria (AC) Fulfilled and checked in the Related issue
## Related issue(s) and PR(s) This PR closes #11 to add the log out functionality. ## Type of change - [x] New feature (non-breaking change which adds functionality) ## List of changes made - New log out action with [redirect ](https://nextjs.org/docs/app/api-reference/functions/redirect) to the log in page using replace to prevent user to go back with the browser buttons - Functions in session and session manager to clear the session cookie - Tests to verify the functionality ## Testing Use the log out button from the menu. ## Definition of Done checklist - [x] I have made an effort making the commit history understandable - [x] I have performed a self-review of my own code and commented any hard-to-understand areas - [x] Existing tests are passing and I wrote unit tests for new functionality - [x] My changes generate no new warnings - [x] Make sure the layout and text follow design sketches, if there are any - [x] All Acceptance Criteria (AC) Fulfilled and checked in the Related issue
aaperis (Migrated from github.com) approved these changes 2026-08-06 22:27:02 +00:00
aaperis (Migrated from github.com) left a comment

Looks and works great, good work!

When inspecting the session cookies after pressing logout, I noticed that we should have included in the issue that the NextAuth's session cookie needs to be cleared as well.
However, this PR does address the current issue so I approve it. I opened the follow-up #146 which can build upon the code implemented here.

Looks and works great, good work! When inspecting the session cookies after pressing logout, I noticed that we should have included in the issue that the NextAuth's session cookie needs to be cleared as well. However, this PR does address the current issue so I approve it. I opened the follow-up #146 which can build upon the code implemented here.
Sign in to join this conversation.
No description provided.