User Story
As a Station platform owner, I need local username/password login restricted to station_super_admin accounts only so customer-facing users must authenticate through Discord OAuth2 while platform support retains a break-glass path if Discord authentication is unavailable.
Definition of Done
Acceptance Criteria
- A
station_super_admin can log in locally when local auth is enabled for break-glass use
- A non-super-admin user with a valid local password cannot log in through the local login endpoint
- A Discord-authenticated non-super-admin user is still able to access Station normally through Discord OAuth2 using the same underlying Station account when linked by email/Discord identity
- Password reset for a non-super-admin user does not create a supported alternate local-login path
- Station does not require a user to create a second Station account in order to move from local-first to Discord-linked authentication
Technical Elaboration
Current Station behavior already supports mixed account data on a single user row via email, password, and nullable discordId, and Discord callback handling already links an existing local account by email when discordId is null. However, current local auth remains generally available when enabled, which conflicts with the desired policy for this epic.
This ticket should harden the auth policy by:
- enforcing a
station_super_admin check in the local-login path
- preventing normal customer local registration in the intended production policy
- ensuring password reset/change flows do not restore local-login eligibility for non-super-admin users
- preserving account-linking behavior so Discord and local credentials can refer to the same Station user when appropriate
Recommended implementation areas to inspect:
backend/src/modules/auth/local.strategy.ts
backend/src/modules/auth/auth.service.ts
backend/src/modules/auth/auth.controller.ts
- any role/system-permission source used to identify
station_super_admin
This issue is intentionally narrower than the broader authn story in #241. It exists to make the break-glass local-login rule explicit and testable.
Design Elaboration
From the user perspective, Station should present one clear rule: normal users sign in with Discord; local login is a support continuity mechanism for the platform operator only. The UI and error handling should reinforce that expectation instead of implying that local and Discord login are equal first-class options for all users.
Parent Epic: #231
Depends on: #241, #242
Blocks: #233
User Story
As a Station platform owner, I need local username/password login restricted to
station_super_adminaccounts only so customer-facing users must authenticate through Discord OAuth2 while platform support retains a break-glass path if Discord authentication is unavailable.Definition of Done
station_super_adminuser even whenAUTH_LOCAL_LOGIN_ENABLED=trueguild_ownerandguild_adminpnpm typecheckpassesAcceptance Criteria
station_super_admincan log in locally when local auth is enabled for break-glass useTechnical Elaboration
Current Station behavior already supports mixed account data on a single
userrow viaemail,password, and nullablediscordId, and Discord callback handling already links an existing local account by email whendiscordIdis null. However, current local auth remains generally available when enabled, which conflicts with the desired policy for this epic.This ticket should harden the auth policy by:
station_super_admincheck in the local-login pathRecommended implementation areas to inspect:
backend/src/modules/auth/local.strategy.tsbackend/src/modules/auth/auth.service.tsbackend/src/modules/auth/auth.controller.tsstation_super_adminThis issue is intentionally narrower than the broader authn story in #241. It exists to make the break-glass local-login rule explicit and testable.
Design Elaboration
From the user perspective, Station should present one clear rule: normal users sign in with Discord; local login is a support continuity mechanism for the platform operator only. The UI and error handling should reinforce that expectation instead of implying that local and Discord login are equal first-class options for all users.
Parent Epic: #231
Depends on: #241, #242
Blocks: #233