Skip to content

PhoenixKit 2.22.0: Fix a mistyped email before confirming the account

PhoenixKit 2.22.0 helps new users who mistyped their email address at sign-up. Until now such an account was stuck: the confirmation email went to the wrong address, and the address could only be changed by an already confirmed account.

Change the email on the confirmation screen

A signed-in user whose account is not yet confirmed lands on the confirmation page at /users/confirm. That page now has a Wrong email? Change it link. It opens a short form with New email and Current password and a button, Update email & resend confirmation.

The confirmation email for the new address links to a new page, /users/confirm/change-email/:token, titled Confirm your new email. Its button, Confirm email change, changes the account’s email and confirms the account in one step, then greets the user with “Email changed and confirmed. Welcome!”. A link that is invalid or has expired is refused with a message. The normal email change page under profile settings could not be used here, because it needs a confirmed account to reach.

A direct answer when resending

On the same page, asking for a new confirmation link used to answer “If your email is in our system and it has not been confirmed yet…”, the careful wording meant for signed-out visitors. A signed-in user now gets a direct message naming their own address: “We’ve sent a new confirmation link to” followed by the address. The email field of that form is now read-only, and the server ignores its value, so it can no longer be used to test whether some other address is registered. The public form for signed-out visitors keeps its careful wording.

Upgrading

No migration and no configuration. Update the dependency. The new confirmation page is added to the routes PhoenixKit mounts, so nothing changes in your router.

Full release notes: PhoenixKit 2.22.0

2.22.0 · 8 September 2026

Added

  • The parked /users/confirm page (where a logged-in but unconfirmed user lands) now has a “Wrong email? Change it” option — a compact version of Profile Settings’ change-email form (current password + new address). Confirming the new address both changes the account’s email and confirms it in one step, so a typo’d signup email no longer strands the account. The confirmation link points at a new, purpose-built page (/users/confirm/change-email/:token) rather than the normal /profile/settings/confirm-email/:token — that page requires a confirmed account to reach, which would have made the fix for “I’m unconfirmed” depend on already being confirmed.

Fixed

  • The parked page’s “Resend confirmation instructions” flash message said “If your email is in our system and it has not been confirmed yet…” even though the visitor was already logged in as that exact account — the enumeration-safe hedge (correct for the public, logged-out resend form) read as a wrong answer once you’re signed in. A logged-in unconfirmed user now gets a direct message naming their own address, and the (previously editable) email field on that form is now read-only and its value ignored server-side — editing it could otherwise be used to probe whether an arbitrary address is registered.

PhoenixKit 2.22.0. Install or update: {:phoenix_kit, "~> 2.22"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.