OAuth Providers
Tracera supports Google, GitHub, and Steam as OAuth/OpenID authentication providers. Each provider is optional — enable only the ones you need.Google OAuth 2.0
Setup
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth 2.0 Client ID
- Set application type to Web application
- Add authorized redirect URI:
{BASE_URL}/api/v1/auth/google/callback - Copy the Client ID and Client Secret
Configuration
Flow
- User clicks “Sign in with Google”
- Frontend redirects to
GET /api/v1/auth/google - Backend generates state parameter and redirects to Google’s authorization endpoint
- User authorizes on Google
- Google redirects to
/api/v1/auth/google/callbackwith authorization code - Backend exchanges code for tokens, fetches user profile
- User is created/matched by email, session is created
GitHub OAuth 2.0
Setup
- Go to GitHub Developer Settings
- Click New OAuth App
- Set the authorization callback URL to:
{BASE_URL}/api/v1/auth/github/callback - Copy the Client ID and generate a Client Secret
Configuration
Flow
Same as Google OAuth, but using GitHub’s authorization endpoints. GitHub provides the user’s email, name, and avatar.Steam OpenID 2.0
Steam uses OpenID 2.0 (not OAuth) for authentication. It has two modes:Login Mode (Unauthenticated)
For users who want to sign in with Steam as their primary auth method:- Endpoint:
GET /api/v1/auth/steam/login - Callback:
GET /api/v1/auth/steam/login/callback - Creates a new account or signs into existing one
Linking Mode (Authenticated)
For users who already have an account and want to link their Steam identity (required for portfolio import):- Endpoint:
GET /api/v1/auth/steam(requires active session) - Callback:
GET /api/v1/auth/steam/callback - Links the Steam identity to the existing account
Setup
- Get a Steam Web API key from Steam Developer
- Set the domain to your application’s domain
Configuration
Security
Steam OpenID responses are validated for:- HTTPS scheme on claimed ID
- Correct host (
steamcommunity.com) - Expected path format (
/openid/id/{steamid64}) - Numeric SteamID64 format
Disabling Providers
Each provider is automatically disabled if its credentials are not set:- Google: Disabled if
GOOGLE_CLIENT_IDorGOOGLE_CLIENT_SECRETis empty - GitHub: Disabled if
GITHUB_CLIENT_IDorGITHUB_CLIENT_SECRETis empty - Steam: Disabled if
STEAM_OPENID_ENABLEDisfalse