Skip to content

PhoenixKit 1.7.189: Sign in by scanning a QR code, Apple Sign-In removed

PhoenixKit 1.7.189 lets a visitor sign in on a computer by scanning a QR code with a phone that is already signed in. It also removes Apple Sign-In and moves to hackney 4, which clears four known security advisories.

QR code sign-in

Turn on Enable QR code sign-in (scan from a signed-in phone) in the authorization settings. The sign-in page then shows Sign in with QR code. The phone’s camera opens the link, the phone shows which browser, system and IP is asking, and the computer is signed in only after the phone approves. Code requests are rate-limited per IP, and turning the setting off stops pending approvals at once.

Other changes

Apple Sign-In and its settings are gone, because its library is unmaintained and held back hackney. Users who linked an Apple account keep the link, but cannot sign in with Apple. Installs in their own database schema with a low-privilege role now install and update cleanly. A scrollbar no longer appears after closing a modal; the installer warns about daisyUI older than 5.6.0.

Upgrading

Run mix phoenix_kit.update. Tell Apple Sign-In users to use another sign-in method.

Full release notes: PhoenixKit 1.7.189

1.7.189 · 12 July 2026

Added

  • QR device-handoff login (“scan to sign in”). A signed-out browser at /users/qr-login shows a QR code; an already-signed-in phone scans it (native camera, no app needed), reviews the requesting device (browser/OS/IP), and taps Approve — the desktop signs in with no password. Approval always happens on the trusted phone; the desktop receives nothing until the phone approves. Built on the new keyfob library. Off by default — enable at Admin → Settings → Authorization → “Enable QR code sign-in”. Post-merge hardening: the qr_login_enabled setting is now enforced as an immediate kill switch on the phone-approval and completion paths (not just the desktop entry point), and request creation is rate-limited per IP (PhoenixKit.Users.RateLimiter.check_qr_login_rate_limit/1) to guard the public, pre-auth mint endpoint against ETS-table exhaustion.

Fixed

  • Prefix hardening for low-privilege multi-schema installs, driven by a field report from a hardened install (DBA-pre-created schema, no database-level CREATE, PG15+ non-writable public, PgBouncer): CREATE EXTENSION/CREATE SCHEMA now check pg_extension/ information_schema.schemata before attempting creation (Postgres checks the CREATE privilege before the IF-NOT-EXISTS short-circuit, failing low-privilege roles even when the object already exists); V27 now threads create_schema: false through to Oban’s migration so it can’t re-default to true and execute a failing CREATE SCHEMA mid-chain; uuid_generate_v7() is now created inside the install’s schema (not wherever search_path happens to point) with all ~89 call sites schema-qualified, including the pgcrypto gen_random_bytes call inside the function body; the prefix is validated at every entry point. New runtime PhoenixKit.SchemaPrefix (all 21 table-backed schemas adopt it) means prefixed installs no longer depend on the DB role’s search_path for ordinary queries. Install/update/status/gen.migration tooling now persists and resolves --prefix correctly, distinguishes an unreachable database from a genuinely absent install, and warns when an existing host Oban config lacks the install’s prefix. Post-merge: fixed a matching unqualified-call bug the same PR’s own sweep missed — V26’s pgcrypto digest() backfill call was still bare (same failure mode as the pre-fix uuid_generate_v7(), now qualified via the new Helpers.pgcrypto_call/1) — and fixed the new Oban prefix-detection regex to skip commented-out config blocks (it could both false-positive on a commented example block and false-negative when a commented block happened to mention prefix:, masking a genuinely unprefixed active block).
  • daisyUI modal scrollbar-gutter compensations removed. Fixes a reported “clicked cancel and a scroll bar showed up” bug on scrolling pages: daisyUI ≥ 5.1’s own conditional gutter reservation handles both scrolling and non-scrolling pages correctly on its own, so core’s 1.7.179 counter-rules and PkDialog’s inline override were fighting it and causing the reflow. PhoenixKit.Install.DaisyUI now declares a designed-for minimum (5.6.0) and warns hosts on an older vendored daisyUI via phoenix_kit.install/.update/.doctor — advisory only, nothing touches host files.
  • The 1.7.188 hackney 4.x upgrade made this package un-publishable, discovered while cutting this release: mix hex.publish refuses to build any package carrying an override: true dependency, which mix.exs needed because ex_aws_sqs (last released Jan 2023, since archived upstream) pins hackney ~> 1.9 — incompatible with ~> 4.0 with no override. Switched the SQS dependency to beamlab_ex_aws_sqs, a maintained fork with the same public API (ExAws.SQS) that declares no hackney dependency at all, clearing the conflict — override: true on both hackney and httpoison is gone, and the now-fully-unused httpoison dependency itself is dropped. The fork also switches SQS from the legacy Query/XML protocol to AWS’s JSON protocol, which changes response shapes (raw %{"QueueUrl" => ...} instead of %{body: %{queue_url: ...}}); PhoenixKit.AWS.InfrastructureSetup (SQS/DLQ provisioning) is updated accordingly, including a latent bug this surfaced — the “queue already exists” fallback path was checking for AWS error code QueueAlreadyExists, but the real SQS API error is QueueNameExists (confirmed against botocore’s service definition), so idempotent re-runs of setup against a differently-configured existing queue likely never hit the intended fallback under the old protocol either.

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