Authentication Overview
Tracera supports four authentication methods, all built on a unified session-based architecture. Users can link multiple providers to a single account.Supported Methods
Google OAuth
Sign in with Google using OAuth 2.0 authorization code flow.
GitHub OAuth
Sign in with GitHub using OAuth 2.0 authorization code flow.
Steam OpenID
Sign in with Steam using OpenID 2.0. Also enables inventory access for portfolio tracking.
Magic Links
Passwordless email-based authentication. Tokens expire after 10 minutes.
How It Works
All authentication methods follow the same pattern:Account Linking
Users can link multiple authentication providers to a single account. The linking is email-based:- If a user signs in with Google (
user@example.com) and later signs in with GitHub using the same email, both providers are linked to the same account. - Each provider can only be linked once per user (enforced by unique constraint).
- Steam can be linked to an existing account for inventory access.
Data Model
Frontend Integration
The frontend uses a server-sidegetSession() function that calls GET /api/v1/auth/me to check authentication status. This is wrapped in an AuthProvider React context for client-side access.
/login.