fix firebase provider

This commit is contained in:
Vckynando12 2025-02-19 06:19:02 +07:00
parent bd9fe33923
commit aa1aa58ffc
1 changed files with 5 additions and 5 deletions

View File

@ -13,16 +13,16 @@ public function register()
{
$this->app->singleton(FirebaseAuth::class, function ($app) {
$factory = (new Factory)
->withServiceAccount(storage_path('app/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
->withServiceAccount(json_decode(env('FIREBASE_CREDENTIALS'), true))
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
return $factory->createAuth();
});
$this->app->singleton(Database::class, function ($app) {
$factory = (new Factory)
->withServiceAccount(storage_path('app/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
->withServiceAccount(config('firebase.credentials'))
->withDatabaseUri(config('firebase.database_url'));
return $factory->createDatabase();
});
@ -32,4 +32,4 @@ public function boot()
{
//
}
}
}