-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Summary
Rewrite the GET /auth/demo endpoint to use native authentication, automatically logging in the demo user without requiring password input.
Background / Context
The current /auth/demo route redirects to Auth0 with the demo email pre-filled. After Auth0 removal (#1289), this endpoint needs to work with the native auth system. The goal is a single-request demo login: accessing the endpoint should authenticate the demo user and return session tokens directly.
Deliverables
- Rewrite
GET /auth/demoto look up the demo user byDEMO_USER_EMAIL, authenticate usingDEMO_USER_PASSWORD, create session and refresh tokens, and redirect to the frontend with an auth code (same pattern as OAuth callback) - Add
DEMO_USER_PASSWORDenvironment variable for the demo user's password - Guard the endpoint behind an environment flag (e.g.,
AUTH_DEMO_LOGIN_ENABLED, defaultfalse) - Remove the Auth0 dependency (
oauth.auth0.authorize_redirect,AUTH0_DOMAINcheck) from the demo route
Acceptance Criteria
-
GET /auth/demoauto-logs in the demo user without password input - Endpoint uses
DEMO_USER_EMAILandDEMO_USER_PASSWORDenv vars - Endpoint is disabled by default and gated behind an env flag
- Returns proper session and refresh tokens
- Redirects to
/dashboardafter login - No Auth0 dependencies remain in the demo route
Reactions are currently unavailable