FeaturesDatabase

Setup

  • In Firebase, select Firestore from the left-hand side and click Get Started .
  • Go to the rules tab and update the security rules for each document to remove public access.

    Here is an example:

    SQL Editor

    service cloud.firestore {
      match /databases/{database}/documents {
        // Match any document in the "users" collection
        match /users/{userId} {
          // Allow read access only if the request is authenticated
          allow read: if request.auth != null;
          
          // Allow write access only if the request is authenticated and the userId matches the authenticated user's ID
          allow write: if request.auth != null && request.auth.uid == userId;
        }
        
        // Match any other document in the database
        match /{document=**} {
          // Allow read access only if the request is authenticated
          allow read: if request.auth != null;
          
          // Allow write access only if the request is authenticated
          allow write: if request.auth != null;
        }
      }
    }
  • (Optional) If you want to collect leads with < app-button-lead />, create a new document called leads .