Firebase Setup

Set up Firebase authentication for your DevOur project.

Create a Firebase Project

  1. Go to the Firebase Console
  2. Click Add project
  3. Enter a project name and click Create project

Register a Web App

  1. In your Firebase project, click the Web icon (</>)
  2. Enter an app nickname
  3. Click Register app
  4. Copy the configuration values shown:
const firebaseConfig = {
  apiKey: 'AIzaSy...',
  authDomain: 'your-project.firebaseapp.com',
  projectId: 'your-project',
  storageBucket: 'your-project.appspot.com',
  messagingSenderId: '123456789',
  appId: '1:123456789:web:abc123'
}

Enable Authentication

  1. In Firebase Console, go to Build > Authentication
  2. Click Get started
  3. Enable Email/Password authentication
  4. Optionally enable Google or other providers

Generate Service Account File

The server needs a service account to verify tokens:

  1. In Firebase Console, click the gear icon > Project settings
  2. Go to Service accounts tab
  3. Click Generate new private key
  4. Save the JSON file securely

Never share this file or commit it to version control.

Configure in DevOur

Add your Firebase credentials in the DevOur web app:

  1. Open your project in DevOur
  2. Go to Settings and open the Integrations tab
  3. Expand the Firebase section and enter:
    • API Key
    • Auth Domain
    • Project ID
    • Storage Bucket
    • Messaging Sender ID
    • App ID
    • Measurement ID (optional)
  4. Upload your service account JSON file
  5. Click Save

For more details on available settings, see Project Settings.

Turn On Passwordless Sign-In (Optional)

Let people sign in to your platform with a link sent to their email instead of a password:

  1. Upload your service account file first. DevOur uses it to change the sign-in methods of your Firebase project.
  2. In your project's Settings, turn on Passwordless sign-in in the Firebase section. From the CLI, set passwordlessSignIn: true in your config and run devour setup.

DevOur turns on email link sign-in in your Firebase project for you. If it reports that it could not change the sign-in methods, check the service account file you uploaded and try again.

Authorize Your Domains

Firebase only allows Google sign-in and email sign-in links from the domains on its authorized list:

  1. In the Firebase Console, go to Authentication > Settings
  2. Under Authorized domains, click Add domain
  3. Enter the domain your platform runs on, such as app.example.com

Add localhost as well to sign in while running your platform on your own machine. Firebase projects created after April 28, 2025 don't include it by default.

Set Up Firestore (Optional)

If your application uses Firestore:

  1. Go to Build > Firestore Database
  2. Click Create database
  3. Choose a location and security mode
  4. Configure security rules as needed

Verify Setup

After downloading and running your project bundle, check the browser console for Firebase errors. The server logs should show successful Firebase initialization.