libredb / libredb/libredb-studio
[FEATURE] auth - support multi-user (not just 1 admin + 1 user)
- Dominant language
- TypeScript
- Stars
- 726
- Forks
- 119
- Avg merge
- 7h 47m
- Merged PRs (30d)
- 265
Description
## Is your feature request related to a problem?
For a team with 3 or more members, having just 2 account can be restrictive. Passwords has to be shared (which means they require changing when a member leaves), and the audit log cannot show which member perform the action if they share the same account.
This may also open up opportunities for things like RLS down the line?
## Describe the solution you'd like
Only the admin account needs to be created on init. User accounts can then be created from within the app afterwards.
## Describe alternatives you've considered
Deploying multiple instances of libredb-studio (not ideal).
## Use Case
Providing access to more than 2 users.
## Implementation Notes (Optional)
Migrate the existing authentication framework to Better Auth:
- https://github.com/better-auth/better-auth
The existing TOTP implementation can be changed to use the two factor plugin:
- https://better-auth.com/docs/plugins/2fa#totp
This is a better user experience than needing to generate and extract the secret to put in our environment variables like the PR #779 (addressing #777).
Contributor guide
Research direction
Begin by reviewing the existing authentication framework and TOTP implementation; the issue names no file or test paths. Done means the app can create multiple user accounts after initialization, preserve admin access, and provide per-user authentication with TOTP through the proposed framework.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100