fix firebase provider
This commit is contained in:
parent
bd9fe33923
commit
aa1aa58ffc
|
@ -13,16 +13,16 @@ public function register()
|
||||||
{
|
{
|
||||||
$this->app->singleton(FirebaseAuth::class, function ($app) {
|
$this->app->singleton(FirebaseAuth::class, function ($app) {
|
||||||
$factory = (new Factory)
|
$factory = (new Factory)
|
||||||
->withServiceAccount(storage_path('app/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
|
->withServiceAccount(json_decode(env('FIREBASE_CREDENTIALS'), true))
|
||||||
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
|
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
|
||||||
|
|
||||||
return $factory->createAuth();
|
return $factory->createAuth();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->app->singleton(Database::class, function ($app) {
|
$this->app->singleton(Database::class, function ($app) {
|
||||||
$factory = (new Factory)
|
$factory = (new Factory)
|
||||||
->withServiceAccount(storage_path('app/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
|
->withServiceAccount(config('firebase.credentials'))
|
||||||
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
|
->withDatabaseUri(config('firebase.database_url'));
|
||||||
|
|
||||||
return $factory->createDatabase();
|
return $factory->createDatabase();
|
||||||
});
|
});
|
||||||
|
@ -32,4 +32,4 @@ public function boot()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue