diff --git a/config/firebase.php b/config/firebase.php index c40ede0..0a1080b 100644 --- a/config/firebase.php +++ b/config/firebase.php @@ -17,6 +17,17 @@ */ 'projects' => [ 'app' => [ + + /** + * ------------------------------------------------------------------------ + * Firebase Authentication + * ------------------------------------------------------------------------ + */ + + 'authentication' => [ + 'tenant_id' => env('FIREBASE_TENANT_ID'), + ], + /* * ------------------------------------------------------------------------ * Credentials / Service Account diff --git a/src/FirebaseProjectManager.php b/src/FirebaseProjectManager.php index a92e1fc..672db50 100644 --- a/src/FirebaseProjectManager.php +++ b/src/FirebaseProjectManager.php @@ -61,6 +61,10 @@ protected function configure(string $name): FirebaseProject $config = $this->configuration($name); + if ($tenantId = $config['authentication']['tenant_id'] ?? null) { + $factory = $factory->withTenantId($tenantId); + } + if ($credentials = $config['credentials']['file'] ?? null) { $resolvedCredentials = $this->resolveCredentials((string) $credentials);