Skip to content

PhoenixKit 2.27.1: IPv6 visitors counted per network for rate limits

PhoenixKit 2.27.1 treats all IPv6 addresses in one /64 network as one visitor. Devices change their temporary IPv6 address inside that network daily, and a client could pick a new address for every request.

Per-address rate limits now count per /64: sign-in, registration, magic link, password reset, confirmation resend, QR sign-in and referral codes. A fresh address per request no longer resets the limit. Sessions no longer log a changed address after a routine rotation, and sign-in alerts recognise the known device instead of treating every new address as a new one. Loopback and link-local addresses stay per address, and addresses that embed an IPv4 address count as that IPv4 address.

IPv6 addresses are also printed in the usual hex form, such as 2001:db8:1::1, instead of decimal groups.

Full release notes: PhoenixKit 2.27.1

2.27.1 · 17 September 2026

Fixed

  • IPv6 clients are grouped by their /64 (IpAddress.network/1). Every address in a /64 belongs to one client, and the OS rotates a temporary address inside it daily:
    • per-IP rate limits (login, registration, magic link, password reset, confirmation resend, QR login, referral codes) now count per /64, so a fresh address per request no longer resets the limit
    • the session fingerprint no longer logs “changed IP” for a rotated address, and login alerts reuse the known-device row instead of adding one per rotation (Active Sessions matches by the same key)
    • loopback (::1), unspecified (::), and link-local (fe80::/10) stay per-address; well-known NAT64 (64:ff9b::/96) and IPv4-compatible (::a.b.c.d) unmap to the embedded IPv4, same as ::ffff:a.b.c.d
    • known-device reuse hits the unique (user, ip, ua) index first and only scans same-UA rows by /64 when grouping is coarser than the address
  • IpAddress.extract_ip_address/1 printed IPv6 as decimal groups ("8193:3512:1:0:0:0:0:1"); it now prints standard hex ("2001:db8:1::1").

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