Skip to content

Commit deadfe9

Browse files
committed
chore(changeset): mark the sign-in floor narrowing as breaking, as narrowings are
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CXhZcHuALPAjkDCiiT
1 parent db95d0d commit deadfe9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.changeset/30202-keep-a-sign-in-method.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
'@objectstack/plugin-auth': patch
33
---
44

5-
fix(plugin-auth): saving the auth settings refuses to turn off the last way to sign in (#30202)
5+
fix(plugin-auth)!: saving the auth settings refuses to turn off the last way to sign in (#30202)
66

77
Clause-②: no (narrowing) — a save an administrator could make before is now refused at the settings save door with the existing `SETTINGS_VALIDATION` / `invalid_value` field error: email and password off while nothing else signs anyone in, and, while email and password is already off, the Google change that removes the last provider. No new error code, export or settings key. Nothing is widened.
88
Metadata-protocol: none
99
Skills-docs: none — no file under `skills/**` teaches `auth.email_password_enabled`; `content/docs/deployment/environment-variables.mdx` already names the `OS_AUTH_EMAIL_PASSWORD_ENABLED` override used for recovery below.
1010

1111
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: auth.email_password_enabled and the auth.google_* keys keep their declarations, and the save door now refuses only the change that leaves no way to sign in. A value stored before is not rewritten (the existing OS_AUTH_EMAIL_PASSWORD_ENABLED override recovers it), so there is nothing at rest for a migration to rewrite. -->
1212

13+
**BREAKING** accept-set narrowing at the auth settings save door (`PUT /api/settings/auth`, `SettingsService.setMany('auth', …)`): a change that would leave no way to sign in is refused, where it was saved before.
14+
1315
- **Before.** Setup → Settings → Authentication, "Enable email/password login" off, save: "Settings saved", with no social provider and SSO off. After the next sign-out nobody could sign in, the administrator included.
1416
- **Now.** `PUT /api/settings/auth` with `email_password_enabled: false` answers `400 SETTINGS_VALIDATION`, with a field error at `email_password_enabled` (`code: invalid_value`, `constraint.lastSignInMethod: email_password`) whose message, in the caller's language (en, zh-CN, ja-JP, es-ES), says to set up and save another sign-in method first. Nothing in that batch is written, and email and password stays on.
1517
- **What counts as another way in.** A social or OIDC provider in force; enterprise SSO switched on with at least one identity provider registered (the switch alone does not count); phone-number sign-in; a host sign-in handoff the host declared. `ssoOnlyMode` alone, magic link and passkeys do not count.

0 commit comments

Comments
 (0)