Skip to content

feat(auth): add authentication and role-based access control - #90

Merged
ivanrdvc merged 3 commits into
mainfrom
feat/auth
Jul 2, 2026
Merged

feat(auth): add authentication and role-based access control#90
ivanrdvc merged 3 commits into
mainfrom
feat/auth

Conversation

@ivanrdvc

@ivanrdvc ivanrdvc commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a login door with better-auth: email/password sessions, an owner
    seeded from env on first run, and role-based read/write gating across
    server functions.
  • Wires the e2e suite through the new auth gate — logs in once as the
    seeded owner and reuses the session — and updates specs that broke on
    the always-on Recent sidebar and the redesigned host filter.

ivanrdvc added 3 commits June 30, 2026 22:16
Email/password sessions via better-auth with a login page and an owner
account seeded from env on first run. Roles (owner/editor/viewer) gate
server functions through can()/requireCan; reads require a session, writes
require the matching resource grant. Admin page manages user roles and
blocks demoting the last owner.

Machine /api surface stays open only to localhost when no LOUPE_API_KEY is
set, and requires the bearer token otherwise. Sessions use cookie cache to
avoid a session-table hit per guard. Human score attribution moves to the
authenticated account.
@ivanrdvc
ivanrdvc merged commit c059661 into main Jul 2, 2026
4 checks passed
@ivanrdvc
ivanrdvc deleted the feat/auth branch July 2, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant