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-loginshows 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 newkeyfoblibrary. Off by default — enable at Admin → Settings → Authorization → “Enable QR code sign-in”. Post-merge hardening: theqr_login_enabledsetting 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 SCHEMAnow checkpg_extension/information_schema.schematabefore 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 threadscreate_schema: falsethrough to Oban’s migration so it can’t re-default totrueand execute a failingCREATE SCHEMAmid-chain;uuid_generate_v7()is now created inside the install’s schema (not whereversearch_pathhappens to point) with all ~89 call sites schema-qualified, including the pgcryptogen_random_bytescall inside the function body; the prefix is validated at every entry point. New runtimePhoenixKit.SchemaPrefix(all 21 table-backed schemas adopt it) means prefixed installs no longer depend on the DB role’ssearch_pathfor ordinary queries. Install/update/status/gen.migration tooling now persists and resolves--prefixcorrectly, 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 pgcryptodigest()backfill call was still bare (same failure mode as the pre-fixuuid_generate_v7(), now qualified via the newHelpers.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 mentionprefix:, 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.DaisyUInow declares a designed-for minimum (5.6.0) and warns hosts on an older vendored daisyUI viaphoenix_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.publishrefuses to build any package carrying anoverride: truedependency, whichmix.exsneeded becauseex_aws_sqs(last released Jan 2023, since archived upstream) pinshackney ~> 1.9— incompatible with~> 4.0with no override. Switched the SQS dependency tobeamlab_ex_aws_sqs, a maintained fork with the same public API (ExAws.SQS) that declares no hackney dependency at all, clearing the conflict —override: trueon both hackney and httpoison is gone, and the now-fully-unusedhttpoisondependency 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 codeQueueAlreadyExists, but the real SQS API error isQueueNameExists(confirmed againstbotocore’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.