Skip to content

fix(auth): handle logout in route handler - #77

Open
rissrice2105-agent wants to merge 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/logout-route
Open

fix(auth): handle logout in route handler#77
rissrice2105-agent wants to merge 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/logout-route

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • move /logout session cleanup into a Route Handler
  • clear the server session and cookie before redirecting home
  • avoid mutating cookies during Server Component rendering

Fixes #76

Testing

  • production reproduction: curl -I https://aiornot.vote/logout returns HTTP 500 before this fix
  • local /logout returns HTTP 307 and expires aon_session
  • 59 tests passed
  • TypeScript typecheck passed
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visiting /logout returns a 500 error

1 participant