Repository navigation
feat(auth): add a phishing-resistant-only login mode - #355
Merged
Merged
Conversation
Adds the phishing_resistant_only config key, which accepts passkeys only for every account apart from the one session that verifies a new account's address. The passkey fallback rule is now enforced on each continuation endpoint rather than only in the /login method list, and decoys mirror both rules. Closes #177.
Bccorb
force-pushed
the
feat/phishing-resistant-only
branch
from
October 7, 2026 00:39
8369444 to
4e9460e
Compare
Bccorb
marked this pull request as ready for review
October 7, 2026 00:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #177.
Depends on
@seamless-auth/types0.27.0 (fells-code/seamless-auth-types#89), now published and pinned here.What changed
phishing_resistant_only(new, defaultfalse)normalizeLoginPolicynarrows the effective policy tologinMethods: ['passkey']and turns fallback off. Only a literaltrueturns it on.403 login_method_disabled(OAuth providers are hidden from start and callback).GET /system-config/publicreportsloginMethods: ["passkey"].auth: 'access'). An already-verified account cannot use that path. An account that never enrolls has to go through admin recovery.issueSessionAndRespondnow takes a requiredmethodand refuses anything butpasskeyin this mode, unless the call is the account-verification one. Each endpoint refuses before it gets there, so this only fires if a future endpoint forgets.PHISHING_RESISTANT_ONLY. Docs updated.Passkey fallback rule is now enforced on the endpoints themselves
passkey_login_fallback_enabled: falseused to be applied only when/loginbuilt the method list. The continuation endpoints checked whether a method was enabled for the deployment, not whether this account was allowed to use it. A user holding a passkey could still call the email or phone code, magic link, TOTP login or email verification endpoint with the ephemeral token/loginissued and get a session. All of those now answer403 login_method_disabledfor that user.Decoy parity
The decoy responders for unknown identifiers apply both rules to the decoy's derived passkey shape (the same one
/loginadvertised for it), so the new refusals do not reveal whether an account exists. There is a parametrized integration suite covering both rules across the affected endpoints.Contract
POST /totp/verify-logingains a403. Everything else that now refuses already documented403 login_method_disabled.Not changed
Verification
npm run typecheck,npm run lint,npm run format:check,npm run build,npm run coverage(1626 passed, thresholds met). Run against a local build of types#89.