-
-
Notifications
You must be signed in to change notification settings - Fork 173
/
firebase.php
221 lines (182 loc) · 8.48 KB
/
firebase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?php
declare(strict_types=1);
return [
/*
* ------------------------------------------------------------------------
* Default Firebase project
* ------------------------------------------------------------------------
*/
'default' => env('FIREBASE_PROJECT', 'app'),
/*
* ------------------------------------------------------------------------
* Firebase project configurations
* ------------------------------------------------------------------------
*/
'projects' => [
'app' => [
/*
* ------------------------------------------------------------------------
* Credentials / Service Account
* ------------------------------------------------------------------------
*
* In order to access a Firebase project and its related services using a
* server SDK, requests must be authenticated. For server-to-server
* communication this is done with a Service Account.
*
* 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
*
* Once you have downloaded the Service Account JSON file, you can use it
* to configure the package.
*
* If you don't provide credentials, the Firebase Admin SDK will try to
* auto-discover them
*
* - by checking the environment variable FIREBASE_CREDENTIALS
* - by checking the environment variable GOOGLE_APPLICATION_CREDENTIALS
* - by trying to find Google's well known file
* - by checking if the application is running on GCE/GCP
*
* If no credentials file can be found, an exception will be thrown the
* first time you try to access a component of the Firebase Admin SDK.
*
*/
'credentials' => env('FIREBASE_CREDENTIALS', env('GOOGLE_APPLICATION_CREDENTIALS')),
/*
* ------------------------------------------------------------------------
* Firebase Auth Component
* ------------------------------------------------------------------------
*/
'auth' => [
'tenant_id' => env('FIREBASE_AUTH_TENANT_ID'),
],
/*
* ------------------------------------------------------------------------
* Firestore Component
* ------------------------------------------------------------------------
*/
'firestore' => [
/*
* If you want to access a Firestore database other than the default database,
* enter its name here.
*
* By default, the Firestore client will connect to the `(default)` database.
*
* https://firebase.google.com/docs/firestore/manage-databases
*/
// 'database' => env('FIREBASE_FIRESTORE_DATABASE'),
],
/*
* ------------------------------------------------------------------------
* Firebase Realtime Database
* ------------------------------------------------------------------------
*/
'database' => [
/*
* In most of the cases the project ID defined in the credentials file
* determines the URL of your project's Realtime Database. If the
* connection to the Realtime Database fails, you can override
* its URL with the value you see at
*
* https://console.firebase.google.com/u/1/project/_/database
*
* Please make sure that you use a full URL like, for example,
* https://my-project-id.firebaseio.com
*/
'url' => env('FIREBASE_DATABASE_URL'),
/*
* As a best practice, a service should have access to only the resources it needs.
* To get more fine-grained control over the resources a Firebase app instance can access,
* use a unique identifier in your Security Rules to represent your service.
*
* https://firebase.google.com/docs/database/admin/start#authenticate-with-limited-privileges
*/
// 'auth_variable_override' => [
// 'uid' => 'my-service-worker'
// ],
],
'dynamic_links' => [
/*
* Dynamic links can be built with any URL prefix registered on
*
* https://console.firebase.google.com/u/1/project/_/durablelinks/links/
*
* You can define one of those domains as the default for new Dynamic
* Links created within your project.
*
* The value must be a valid domain, for example,
* https://example.page.link
*/
'default_domain' => env('FIREBASE_DYNAMIC_LINKS_DEFAULT_DOMAIN'),
],
/*
* ------------------------------------------------------------------------
* Firebase Cloud Storage
* ------------------------------------------------------------------------
*/
'storage' => [
/*
* Your project's default storage bucket usually uses the project ID
* as its name. If you have multiple storage buckets and want to
* use another one as the default for your application, you can
* override it here.
*/
'default_bucket' => env('FIREBASE_STORAGE_DEFAULT_BUCKET'),
],
/*
* ------------------------------------------------------------------------
* Caching
* ------------------------------------------------------------------------
*
* The Firebase Admin SDK can cache some data returned from the Firebase
* API, for example Google's public keys used to verify ID tokens.
*
*/
'cache_store' => env('FIREBASE_CACHE_STORE', 'file'),
/*
* ------------------------------------------------------------------------
* Logging
* ------------------------------------------------------------------------
*
* Enable logging of HTTP interaction for insights and/or debugging.
*
* 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 log level 'notice'.
*
* Note: Using the same channel for simple and debug logs will result in
* two entries per request and response.
*/
'logging' => [
'http_log_channel' => env('FIREBASE_HTTP_LOG_CHANNEL'),
'http_debug_log_channel' => env('FIREBASE_HTTP_DEBUG_LOG_CHANNEL'),
],
/*
* ------------------------------------------------------------------------
* HTTP Client Options
* ------------------------------------------------------------------------
*
* Behavior of the HTTP Client performing the API requests
*/
'http_client_options' => [
/*
* Use a proxy that all API requests should be passed through.
* (default: none)
*/
'proxy' => env('FIREBASE_HTTP_CLIENT_PROXY'),
/*
* Set the maximum amount of seconds (float) that can pass before
* a request is considered timed out
*
* The default time out can be reviewed at
* https://github.com/kreait/firebase-php/blob/6.x/src/Firebase/Http/HttpClientOptions.php
*/
'timeout' => env('FIREBASE_HTTP_CLIENT_TIMEOUT'),
'guzzle_middlewares' => [],
],
],
],
];