Per-user disableLocalStrategy (SSO-only accounts)

Open
#958 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Start from the /auth/login route and find where password login is checked against the global passwordless settings, then see how the user record is loaded there. The issue leaves open whether the flag lives in an auth user column or a profile field, so settle that first. Done means a flagged user is refused password login with a clear message, can still sign in through an enabled passwordless method, and unflagged users behave as before, with unit and E2E tests covering each case.

Written by the indexing model from the issue text.

Description

area: auth enhancement priority: P2 security

Follow-up to #956 (auth hardening review). Missing functionality (minor).

Gap

We have global passwordless methods (magic-link, email-OTP, social), but no per-user flag to disable password login for an individual account. The goal: create users that exist for SSO/API only and cannot password-authenticate, while still retaining their profile fields.

Proposed

  • A per-user password_login_disabled flag (auth_user column or profile field).
  • /auth/login (+ form) rejects password auth for flagged users with a clear message; magic-link/OTP/social still work.
  • Admin user create/edit toggle.

Acceptance

  • Flagged user cannot log in with email+password; can still use an enabled passwordless method.
  • Unflagged users unaffected.
  • Unit + E2E coverage.
Dominant language
TypeScript
Stars
1.8k
Forks
219
Avg merge
2d 21h
Merged PRs (30d)
67

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SonicJs-Org/sonicjs

All issues in SonicJs-Org/sonicjs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.