Skip to content

Commit

Permalink
Disable the configuration to disable auto-discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed Jan 8, 2023
1 parent 1fec178 commit 9f9aa5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## Unreleased

* Dropped support for Lumen
* The ability to disable credentials auto-discovery has been removed. If you don't want a service account to be
auto-discovered, provide it by setting the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or by adapting
the package configuration.

## 4.2.0 - 2022-07-28

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ For server-to-server communication this is done with a Service Account.
The package uses auto discovery for the default project to find the credentials needed for authenticating requests to
the Firebase APIs by inspecting certain environment variables and looking into Google's well known path(s).

If you don't want a service account to be auto-discovered, provide it by setting the `GOOGLE_APPLICATION_CREDENTIALS`
environment variable or by adapting the package configuration.

If you don't already have generated a Service Account, you can do so by following the instructions from the
official documentation pages at https://firebase.google.com/docs/admin/setup#initialize_the_sdk.

Expand All @@ -39,8 +42,6 @@ environment variables starting with `FIREBASE_` in your `.env` file. Usually, th
required for the package to work:

```
# relative or full path to the Service Account JSON file
FIREBASE_CREDENTIALS=
# You can find the database URL for your project at
# https://console.firebase.google.com/project/_/database
FIREBASE_DATABASE_URL=https://<your-project>.firebaseio.com
Expand Down
9 changes: 1 addition & 8 deletions config/firebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
*/
'credentials' => [
'file' => env('FIREBASE_CREDENTIALS', env('GOOGLE_APPLICATION_CREDENTIALS')),

/*
* If you want to prevent the auto discovery of credentials, set the
* following parameter to false. If you disable it, you must
* provide a credentials file.
*/
'auto_discovery' => true,
],

/*
Expand Down Expand Up @@ -153,7 +146,7 @@
* Log channels are defined in config/logging.php
*
* Successful HTTP messages are logged with the log level 'info'.
* Failed HTTP messages are logged with the the log level 'notice'.
* Failed HTTP messages are logged with the log level 'notice'.
*
* Note: Using the same channel for simple and debug logs will result in
* two entries per request and response.
Expand Down

0 comments on commit 9f9aa5b

Please sign in to comment.