Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
When storage is sqlite or postgres, local email/password accounts live in an accounts table. Env credentials seed that table once. Passwords are scrypt, and Admin → Accounts can create, disable, delete, and enrol TOTP. Local mode and OIDC stay on their existing paths.
nawazish2
force-pushed
the
feat/784-local-accounts
branch
from
September 25, 2026 17:23
d99282b to
d195507
Compare
This branch has not been deployed
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.
Summary
When
STORAGE_PROVIDERissqliteorpostgres, local email/password accounts live in anaccountstable next touser_storage.ADMIN_EMAIL/ADMIN_PASSWORD, andUSER_*when a password is set, are copied in once while the table is empty. Further accounts are created under Admin → Accounts.Passwords are stored as scrypt (N=16384, r=8, p=1, 16-byte salt, 32-byte key). A stored hash that used different parameters is rewritten after a successful login. Disabling an account blocks login and keeps its
user_storagerows. Deleting an account removes those rows. The last enabled admin cannot be disabled, demoted, or deleted.TOTP enrolment for a stored account is
POST /api/auth/totp(begin,confirm,disable).STORAGE_PROVIDER=localstill authenticates the environment variables on every login.NEXT_PUBLIC_AUTH_PROVIDER=oidcdoes not read or write the table.Closes #784
Testing
bun run typecheckbun tests/run-tests.tsfor the account, login, enumeration, route-auth, storage-provider, and admin-tab tests (181 passing)carol@example.comreturned 201 and showed the row, disabling that account made a later login 401, and the admin could still sign inNot run locally:
bun run format(Biome check on the touched files was clean), fullbun run lint,knip,readme:check,chart:check,channels:showcase:check,security:check, the fullbun run testsuite,coverage:check, andbuild.