Skip to main content

Google OAuth 2.0

1

Create Google Cloud Project

Go to Google Cloud Console and create a new project (or select existing).
2

Enable OAuth Consent Screen

Navigate to APIs & Services > OAuth consent screen. Configure the consent screen with your app name and authorized domains.
3

Create Credentials

Go to APIs & Services > Credentials and click Create Credentials > OAuth 2.0 Client ID.
  • Application type: Web application
  • Authorized redirect URI: {BASE_URL}/api/v1/auth/google/callback
4

Configure Environment

GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret

GitHub OAuth 2.0

1

Register OAuth App

Go to GitHub Developer Settings > OAuth Apps and click New OAuth App.
2

Configure App

  • Application name: Tracera
  • Homepage URL: Your BASE_URL
  • Authorization callback URL: {BASE_URL}/api/v1/auth/github/callback
3

Generate Secret

After creating the app, click Generate a new client secret.
4

Configure Environment

GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret

Steam OpenID 2.0

1

Get API Key

Register for a Steam Web API key at Steam Developer.Set the domain to your application’s domain.
2

Configure Environment

STEAM_API_KEY=your-steam-api-key
STEAM_OPENID_ENABLED=true
Steam uses OpenID 2.0, not OAuth 2.0. No client ID or secret is needed — just the API key for fetching player profiles after authentication.

Testing Locally

For local development, set BASE_URL=http://localhost:8080 and configure callback URLs accordingly:
ProviderCallback URL
Googlehttp://localhost:8080/api/v1/auth/google/callback
GitHubhttp://localhost:8080/api/v1/auth/github/callback
SteamUses BASE_URL automatically
Google may require localhost to be added as an authorized JavaScript origin. GitHub allows localhost callbacks by default.