Support FIREBASE_TENANT_EMULATOR_HOST in TenantManagementService#962
Support FIREBASE_TENANT_EMULATOR_HOST in TenantManagementService#962KetanHegde wants to merge 3 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Firebase Tenant Emulator by checking the FIREBASE_TENANT_EMULATOR_HOST environment variable and configuring the tenant management service to use the emulator host and credentials when available. The tests have also been updated to run in both emulated and non-emulated modes. Feedback on this PR suggests falling back to the standard FIREBASE_AUTH_EMULATOR_HOST if the tenant-specific emulator host is not set, ensuring a smoother developer experience when running the local Auth emulator.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary
This PR adds support for running
TenantManagementServiceagainst the Firebase Authentication Emulator using a new environment variable,FIREBASE_TENANT_EMULATOR_HOST.When this environment variable is set,
_TenantManagementServiceuses the emulator endpoint instead of the production Identity Toolkit endpoint and initializes the client withEmulatorAdminCredentials.Changes
FIREBASE_TENANT_EMULATOR_HOSTget_tenant_emulator_host()helper_TenantManagementServiceto use the emulator endpoint when configuredTesting
Executed:
Result:
Also verified with:
The remaining pylint warnings are pre-existing in the test module.
Implements #910