Skip to content

Comments

Delete session cookie if invalid#234

Merged
archessmn merged 3 commits intomainfrom
mia/fix-broken-session-cookie
Feb 11, 2026
Merged

Delete session cookie if invalid#234
archessmn merged 3 commits intomainfrom
mia/fix-broken-session-cookie

Conversation

@archessmn
Copy link
Member

What

Add a logout route and redirect to it if a session cookie with an invalid user ID is found.

Why

Mostly an issue with local dev, but page can redirect too much if the database has been reset and the user doesn't exist.

How

Copy session reset logic from LogoutButton

Testing

Works 👍

@jenkins-ystv
Copy link

jenkins-ystv bot commented Feb 11, 2026

Deployed a preview of this PR to https://pr-234-internal.dev.ystv.co.uk

@archessmn archessmn merged commit 4b5a197 into main Feb 11, 2026
5 checks passed
@archessmn archessmn deleted the mia/fix-broken-session-cookie branch February 11, 2026 22:34
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.

1 participant