PhoenixKit 2.13.13: OAuth and AWS secrets encrypted, and a home for the key
PhoenixKit 2.13.13 encrypts the OAuth client secrets for Google, GitHub and Facebook and the AWS access keys when they are saved, with the same encryption as integration credentials.
mix phoenix_kit.integrations.rotate_key used to print a new encryption key once and save it nowhere; losing that line meant losing every stored credential. With config :phoenix_kit, integrations_key_store: PhoenixKit.Integrations.KeyStore.File the key is written to a file, mode 0600, and read back before any data is touched. Rotation also re-encrypts the newly encrypted settings. mix phoenix_kit.doctor and the admin Integrations settings report the state of the key.
Other fixes: the language switcher replaces the language in the address instead of stacking prefixes such as /en/fr/; the dashboard greeting no longer changes right after the page loads; and install and update edits to config.exs and application.ex are checked before they are written. Charts gain an option to put 1 at the top, for rankings.
Full release notes: PhoenixKit 2.13.13
2.13.13 · 28 August 2026
Added
- Integrations encryption key store — a rotated secret from
mix phoenix_kit.integrations.rotate_keynow survives past the terminal it was printed in.PhoenixKit.Integrations.KeyStore(file/S3/chain backends) persists it, verified by a write-then-read-back check before rotation touches any data;mix phoenix_kit.doctorand the admin Integrations settings page report the same key verdict as the boot-time warning, from one sharedEncryption.key_report/0. (#756) - Restricted setting values are encrypted at rest —
oauth_google_client_secret,oauth_github_client_secret,oauth_facebook_app_secret,aws_access_key_id, andaws_secret_access_keyare now written through the same encryption used for integration credentials, and decrypted on every read path (including the boot-time settings cache warmer). (#759) config.exs/application.exsplices verify before they’re adopted — every regex-based install/update splice (Oban wiring, boot hook, Ueberauth fix, dev-mailer guard) now parses the candidate output and confirms the intended change actually landed in the right place before writing it; otherwise the original content is kept and a manual-fallback message is printed. Along the way, fixed a buffer-vs-disk bug that could silently discard an earlier install/update step’s edit to the same file, an unanchoredplugins:/crontab:regex that could match a neighbouring app’s config, and an unconditional leading comma that could corrupt a crontab already ending in one. (#758)<.line_chart>/<.sparkline>gained ay_invertattr so rank-like data (search position, leaderboard) plots “1 is best, at the top” without the caller negating its own values;table_default.ex’scard_media_classattr frames the:card_mediaslot;<.translatable_field>forwardsphx-hook/data-*/aria-*to its underlying input via a newdebounce- configurable:restglobal attr. (#760)
Fixed
- Key rotation silently stranded restricted settings. The key rotation
added by #756 only re-encrypted
module: "integrations"rows; the restricted setting values #759 added (same PR cycle) are stored withmodule: niland share the same encryption key, so a routine rotation left them under the old key — reads then failed closed (logged, dropped) the moment the app restarted onto the new key, taking OAuth login and AWS config dark with no warning from the rotation task.KeyRotationnow rotates both row shapes in the same pass. - The admin dashboard’s rotating greeting re-rolled the instant the
websocket connected (LiveView calls
mount/3twice per page load), so the greeting visibly changed on nearly every visit instead of staying put for the page load. (#761) - The language switcher stacked locale prefixes (
/en/fr/...) instead of replacing one — three drifted copies of the URL builder inAdminNav,LayoutWrapper, andUserDashboardNavare now oneRoutes.locale_switch_path/3. (#761) - Bumped the Leaf JS bundle to 0.6.0, with a test holding the CDN pin and the Hex lock together. (#761)
PhoenixKit 2.13.13. Install or update: {:phoenix_kit, "~> 2.13"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.