Skip to content

Feature Request: Accept explicit project_id in App::live() #26

@Sydney-o9

Description

@Sydney-o9

Thank you for this library 👍

Would you be open to adding an explicit project_id parameter to App::live() (or a companion constructor like App::live_with_project_id()) to avoid coupling project resolution to the GOOGLE_CLOUD_PROJECT environment variable?

Use case

It is common to split GCP projects by concern — one project for identity management (Firebase Auth), another for the running environment (production, staging, etc.). This lets you share a single identity layer across environments.

In this setup, GOOGLE_CLOUD_PROJECT is already claimed by the environment project (used by Cloud Storage and other GCP libraries). Setting it to the IDP project to satisfy this SDK would break those services, and vice versa.

As an example of crates who do this, the firebase-auth crate handles this cleanly by accepting project_id directly:

impl FirebaseAuth {
    pub async fn new(project_id: &str) -> FirebaseAuth {

A similar API on App would allow callers to supply the project ID from their own config without side effects on other GCP libraries.


Update. The following Pull Request is ready for review at your discretion: #27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions