Skip to main content

Auth0 Setup

Multiforum uses Auth0 for authentication. Auth0 handles user login, registration, and token management.

Create an Auth0 Account

  1. Sign up at Auth0 (free tier available)
  2. Create a new tenant (or use the default one)

Create an Application

  1. Go to Applications > Applications in the Auth0 dashboard
  2. Click Create Application
  3. Name it (e.g., "Multiforum")
  4. Select Single Page Application
  5. Click Create

Configure Application Settings

In your application's Settings tab, configure:

Application URIs

Replace your-frontend-domain.com with your actual domain:

  • Allowed Callback URLs: https://your-frontend-domain.com/callback
  • Allowed Logout URLs: https://your-frontend-domain.com
  • Allowed Web Origins: https://your-frontend-domain.com

For local development, add:

  • Allowed Callback URLs: http://localhost:3000/callback
  • Allowed Logout URLs: http://localhost:3000
  • Allowed Web Origins: http://localhost:3000

Save Your Credentials

Note these values from the Settings tab:

  • Domain (e.g., your-tenant.auth0.com)
  • Client ID
  • Client Secret

Create an API

  1. Go to Applications > APIs
  2. Click Create API
  3. Name it (e.g., "Multiforum API")
  4. Set an Identifier (e.g., https://api.your-domain.com)
  5. Click Create

Note the Identifier - this is your API Audience.

Required Environment Variables

Frontend (.env)

VITE_AUTH0_DOMAIN=your-tenant.auth0.com
VITE_AUTH0_CLIENT_ID=your-client-id
VITE_AUTH0_CLIENT_SECRET=your-client-secret
VITE_AUTH0_AUDIENCE=https://api.your-domain.com
VITE_AUTH0_SCOPE=openid profile email
VITE_AUTH0_URL=https://your-tenant.auth0.com/oauth/token
VITE_AUTH0_CALLBACK_URL=https://your-frontend-domain.com/callback
VITE_LOGOUT_URL=https://your-frontend-domain.com

Backend (.env)

AUTH0_DOMAIN=your-tenant.auth0.com
AUTH0_CLIENT_ID=your-client-id

Next Steps

Continue setting up the other prerequisites: