Skip to content

fix: let users with an unverified email log out - #214

Merged
jaspermayone merged 1 commit into
mainfrom
jaspermayone/logout-unverified-email
Oct 15, 2026
Merged

jaspermayone merged 1 commit into
mainfrom
jaspermayone/logout-unverified-email

Conversation

@jaspermayone

Copy link
Copy Markdown
Member

Follow-up to #213.

Problem

logout ran behind authenticate_user!, which also requires a verified email. A signed-in user with an unverified email who clicked logout went to the email confirmation page and stayed signed in.

Change

AuthController skips authenticate_user! for logout and uses authenticate_user_without_email_verification! instead. A signed-out request to logout still goes to /login.

Tests

  • New example in spec/requests/logout_spec.rb: a user with an unverified email logs out, and the user_sessions row is signed out. It fails without the fix.
  • RSpec: 1048 examples, 0 failures. Minitest: 11 runs, 0 failures.
  • bin/rubocop did not run: it crashes on main (prism / rubocop-ast).

@jaspermayone
jaspermayone requested a review from a team October 15, 2026 01:25
@jaspermayone
jaspermayone merged commit 33cd82d into main Oct 15, 2026
7 of 9 checks passed
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