User Management

Manage users and their roles.
Use the Firebase Console for creating user accounts and the Firestore console to assign roles.

Setup Instructions

To make the role system work, you must create a document for each user in your Firestore database.

  1. Go to the Firebase Console and create user accounts in the **Authentication** section.
  2. Go to the **Firestore Database** section.
  3. Create a top-level collection named `users`.
  4. For each user, create a new document in the `users` collection. The **Document ID** must be the user's UID from the Authentication section.
  5. Inside each document, add the following fields:
    • `name` (Type: string) - e.g., "Alice Admin"
    • `email` (Type: string) - e.g., "alice@starlight.com"
    • `role` (Type: string) - Must be one of: "Owner", "Corporate", or "User"
    • `companyId` (Type: string) - The ID of the company they belong to (e.g., "starlight"). Leave it as an empty string for Owners.

The app will then use these documents to determine user permissions.

User List
A list of all users found in the `users` collection in Firestore.
User NameEmailCompanyRoleActions
Loading users...