Zudoku
Supported Providers

Firebase Setup

Firebase Authentication provides a comprehensive identity solution from Google, supporting email/password authentication and federated identity providers like Google, Facebook, Twitter, and more. This guide shows you how to integrate Firebase Authentication with your Zudoku documentation site.

Prerequisites

  • A Google account to access Firebase Console
  • A Firebase project (free tier available)
  • Basic knowledge of Firebase configuration

Setup Firebase

  1. Go to the Firebase Console:
  2. Click Create a project (or select an existing project)
  3. Make sure authentication is enabled. Choose your preferred authentication providers.
  4. Configure Authorized Domains, add your domains where the authentication will be used.
  5. Get Your Firebase Configuration
    • Go to Project settings
    • Scroll to Your apps section
    • Click Add appWeb if you haven't already
    • Register your app with a nickname
    • Copy the Firebase configuration object

Configure Zudoku

Add the Firebase configuration to your Zudoku configuration file:

TypeScriptCode
export default { authentication: { type: "firebase", // Replace these with your Firebase project configuration // Get these values from Firebase Console > Project Settings apiKey: "<insert your API key here>", authDomain: "your-domain.firebaseapp.com", projectId: "your-project-id", appId: "1:296819355813:web:91d29f11cac6f073595d4c", // Optional fields storageBucket: "your-project.firebasestorage.app", messagingSenderId: "296819355813", measurementId: "G-12W6TTNR75", // Optional: specify which providers to show in the sign-in UI // Available providers: "google", "github", "facebook", "twitter", // "microsoft", "apple", "yahoo", "password", "emailLink" // If not specified, all enabled providers in Firebase will be available providers: ["google", "github", "password"], // Optional: disable the sign-up UI for invite-only setups. Defaults to false. // When true, the Register button and "Sign up" link are hidden, and /signup shows a message. // Visual only — also disable sign-ups in your Firebase project for real enforcement. disableSignUp: true, // Optional: send Register to a separate URL instead of /signup // (absolute URL → external redirect, relative path → in-app navigate) signUp: { url: "/register" }, // Optional: configure redirect URLs after authentication redirectToAfterSignIn: "/docs", redirectToAfterSignUp: "/getting-started", redirectToAfterSignOut: "/", }, };
Last modified on