Skip to content

PhoenixKit 1.7.192: Users can see and sign out their own sessions

PhoenixKit 1.7.192 gives each user an Active Sessions list in their account settings, where they can sign out of one device or all others, and tells them in the app when a new device signs in.

The list shows each session’s device, location and last activity, and marks This device. Sign out ends one session, Sign out other sessions ends all the rest after a confirmation. Older sessions without device history show as Unknown device. Migration V147 stores each known device’s city and country, so the list does not look them up on every view.

A sign-in from an unrecognized device now also creates a notification of the new Security type, next to the email that was already sent. The QR sign-in page gets a Keep me logged in checkbox and returns the user to the page they came from. It also shows the code at once: the location lookup is limited to 1.5 seconds, and a missing IP is no longer shown as “unknown”.

Upgrading

Run mix phoenix_kit.update for V147.

Full release notes: PhoenixKit 1.7.192

1.7.192 · 14 July 2026

Added

  • Self-service Active Sessions — a :sessions section in UserSettings lists a user’s live sessions (device, location, last active), flags the current one, and lets them revoke a single session or all other sessions. Sessions are enriched from KnownDevice history; degrades gracefully (no browser/OS/location) for sessions predating device fingerprinting.
  • QR sign-in remember-me and return-to — the desktop QR sign-in page gained a “Keep me logged in” checkbox and now carries a sanitized return_to through the mint → approve → finish handoff, both wired into the existing UserAuth.log_in_user/3 remember_me/user_return_to machinery.
  • In-app notification for new-device sign-ins — LoginAlerts now raises a standalone "security"-type notification (new core notification type) alongside the existing email when a login is seen from an unrecognized device.
  • V147: persists the resolved "City, Country" geo-location on phoenix_kit_user_known_devices (nullable location) so Active Sessions doesn’t need a live geo lookup per render.

Fixed

  • QR confirm screen no longer shows a bare “unknown” IP when IpAddress.extract_from_socket/1 can’t read peer data — treated as absent, same as a blank IP.
  • The desktop QR page’s connected mount no longer blocks showing the QR code behind a synchronous, up-to-~10s (two sequential providers × 5s each) geolocation lookup. QrLogin.location_for/1 now bounds the lookup to 1.5s via an unlinked, supervised Task — a slow/unreachable geo API degrades to “no location” instead of stalling the page whose only job is showing the code quickly.
  • Corrected Russian/Estonian translations for the new session-management strings introduced above, including an inverted "Sign out" → "Войти"/"Logi sisse" (“Log in”) that mix gettext.merge fuzzy-matched against unrelated existing entries and left uncorrected.

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