Skip to content

Commit 835e08f

Browse files
committed
Merged with master
2 parents 5aa4dc0 + 6c0204c commit 835e08f

37 files changed

+9855
-2791
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ test/resources/apikey.txt
1616

1717
# Release tarballs should not be checked in
1818
firebase-admin-*.tgz
19+
20+
docgen/html/

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ language: node_js
22
node_js:
33
- "10"
44
- "8"
5-
- "7"
6-
- "6"

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
-
44

5+
# v8.1.0
6+
7+
- [added] `admin.projectManagement().listAppMetadata()` method to list the app summary of up to 100
8+
apps in a Firebase project
9+
- [added] `admin.projectManagement().setDisplayName()` method to update the display name of a
10+
Firebase project
11+
- [fixed] The SDK now automatically retries HTTP calls failing due to 503 errors.
12+
13+
# v8.0.0
14+
15+
- [changed] Dropped support for Node 6. Developers must use Node 8.13.0 or
16+
higher.
17+
- [changed] Upgraded Cloud Firestore client to v2.0.0.
18+
19+
# v7.4.0
20+
21+
- [changed] Upgraded Cloud Firestore client to v1.3.0.
22+
523
# v7.3.0
624

725
- [feature] Added the provider config management APIs for managing OIDC and SAML

CONTRIBUTING.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ information on using pull requests.
8585

8686
## <a name="local-setup"></a>Need to get set up locally?
8787

88+
### Prerequisites
89+
90+
1. Node.js 8.13.0 or higher.
91+
2. NPM 5 or higher (NPM 6 recommended).
92+
3. Google Cloud SDK ([`gcloud`](https://cloud.google.com/sdk/downloads) utility)
93+
8894
### Initial Setup
8995

9096
Run the following commands from the command line to get your local environment set up:
@@ -95,9 +101,8 @@ $ cd firebase-admin-node # go to the firebase-admin-node directory
95101
$ npm install # install local npm build / test dependencies
96102
```
97103

98-
In order to run the tests, you also need to
99-
[download the `gcloud` CLI](https://cloud.google.com/sdk/downloads), run the following command, and
100-
follow the prompts:
104+
In order to run the tests, you also need to authorize the `gcloud` utility with
105+
Google application default credentials:
101106

102107
```bash
103108
$ gcloud beta auth application-default login
@@ -130,19 +135,31 @@ If you wish to skip the linter, and only run the unit tests:
130135
$ npm run test:unit
131136
```
132137

133-
The integration test suite requires a service account JSON key file, and an API key for a Firebase
134-
project. Create a new project in the [Firebase console](https://console.firebase.google.com) if
135-
you do not already have one. Use a separate, dedicated project for integration tests since the
136-
test suite makes a large number of writes to the Firebase realtime database. Download the service
137-
account key file from the "Settings > Service Accounts" page of the project, and copy it to
138-
`test/resources/key.json`. Also obtain the API key for the same project from "Settings > General",
139-
and save it to `test/resources/apikey.txt`.
140-
141-
Some Auth integration tests require that you enable the IAM API for your Firebase/GCP project,
142-
and grant your service account ID the "Service Account Token Creator" role. These must be done
143-
via the Google Cloud Console. Refer to the
144-
[troubleshooting instructions](https://firebase.google.com/docs/auth/admin/create-custom-tokens#troubleshooting)
145-
in the official documentation for more details on how to achieve this.
138+
The integration tests run against an actual Firebase project. Create a new
139+
project in the [Firebase Console](https://console.firebase.google.com), if you
140+
do not already have one suitable for running the tests against. Then obtain the
141+
following credentials from the project:
142+
143+
1. *Service account certificate*: This can be downloaded as a JSON file from
144+
the "Settings > Service Accounts" tab of the Firebase console. Copy the
145+
file into the repo so it's available at `test/resources/key.json`.
146+
2. *Web API key*: This is displayed in the "Settings > General" tab of the
147+
console. Copy it and save to a new text file at `test/resources/apikey.txt`.
148+
149+
Then set up your Firebase/GCP project as follows:
150+
151+
1. Enable Firestore: Go to the Firebase Console, and select "Database" from
152+
the "Develop" menu. Click on the "Create database" button. You may choose
153+
to set up Firestore either in the locked mode or in the test mode.
154+
2. Enable password auth: Select "Authentication" from the "Develop" menu in
155+
Firebase Console. Select the "Sign-in method" tab, and enable the
156+
"Email/Password" sign-in method.
157+
3. Enable the IAM API: Go to the
158+
[Google Cloud Platform Console](https://console.cloud.google.com) and make
159+
sure your Firebase/GCP project is selected. Select "APIs & Services >
160+
Dashboard" from the main menu, and click the "ENABLE APIS AND SERVICES"
161+
button. Search for and enable the "Identity and Access Management (IAM)
162+
API".
146163

147164
Finally, to run the integration test suite:
148165

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ requests, code review feedback, and also pull requests.
5555

5656
## Supported Environments
5757

58-
We support Node.js 6 and higher. However, we recommend developers to use
59-
at least Node.js 8. Support for Node.js 6 is currently deprecated and
60-
will be discontinued in the future.
58+
We support Node.js 8.13.0 and higher.
6159

6260
Please also note that the Admin SDK should only
6361
be used in server-side/back-end environments controlled by the app developer.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Firebase Admin Node.js SDK Reference
2+
3+
The Admin SDK lets you interact with Firebase from privileged environments.
4+
You can install it via our [npm package](https://www.npmjs.com/package/firebase-admin).
5+
6+
To get started using the Firebase Admin Node.js SDK, see
7+
[Add the Firebase Admin SDK to your server](https://firebase.google.com/docs/admin/setup).
8+
9+
For source code, see the [Firebase Admin Node.js SDK GitHub repo](https://github.com/firebase/firebase-admin-node).
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
toc:
2+
- title: "admin"
3+
path: /docs/reference/admin/node/admin
4+
section:
5+
- title: "AppOptions"
6+
path: /docs/reference/admin/node/admin.AppOptions
7+
- title: "FirebaseArrayIndexError"
8+
path: /docs/reference/admin/node/admin.FirebaseArrayIndexError
9+
- title: "FirebaseError"
10+
path: /docs/reference/admin/node/admin.FirebaseError
11+
- title: "GoogleOAuthAccessToken"
12+
path: /docs/reference/admin/node/admin.GoogleOAuthAccessToken
13+
- title: "ServiceAccount"
14+
path: /docs/reference/admin/node/admin.ServiceAccount
15+
16+
- title: "admin.app"
17+
path: /docs/reference/admin/node/admin.app
18+
section:
19+
- title: "App"
20+
path: /docs/reference/admin/node/admin.app.App
21+
22+
- title: "admin.auth"
23+
path: /docs/reference/admin/node/admin.auth
24+
section:
25+
- title: "Auth"
26+
path: /docs/reference/admin/node/admin.auth.Auth
27+
- title: "ActionCodeSettings"
28+
path: /docs/reference/admin/node/admin.auth.ActionCodeSettings
29+
- title: "AuthProviderConfig"
30+
path: /docs/reference/admin/node/admin.auth.AuthProviderConfig
31+
- title: "AuthProviderConfigFilter"
32+
path: /docs/reference/admin/node/admin.auth.AuthProviderConfigFilter
33+
- title: "CreateRequest"
34+
path: /docs/reference/admin/node/admin.auth.CreateRequest
35+
- title: "ListProviderConfigResults"
36+
path: /docs/reference/admin/node/admin.auth.ListProviderConfigResults
37+
- title: "OIDCAuthProviderConfig"
38+
path: /docs/reference/admin/node/admin.auth.OIDCAuthProviderConfig
39+
- title: "OIDCUpdateAuthProviderRequest"
40+
path: /docs/reference/admin/node/admin.auth.OIDCUpdateAuthProviderRequest
41+
- title: "SAMLAuthProviderConfig"
42+
path: /docs/reference/admin/node/admin.auth.SAMLAuthProviderConfig
43+
- title: "SAMLUpdateAuthProviderRequest"
44+
path: /docs/reference/admin/node/admin.auth.SAMLUpdateAuthProviderRequest
45+
- title: "UpdateRequest"
46+
path: /docs/reference/admin/node/admin.auth.UpdateRequest
47+
- title: "UserImportOptions"
48+
path: /docs/reference/admin/node/admin.auth.UserImportOptions
49+
- title: "UserImportRecord"
50+
path: /docs/reference/admin/node/admin.auth.UserImportRecord
51+
- title: "UserImportResult"
52+
path: /docs/reference/admin/node/admin.auth.UserImportResult
53+
- title: "DecodedIdToken"
54+
path: /docs/reference/admin/node/admin.auth.DecodedIdToken
55+
- title: "UserInfo"
56+
path: /docs/reference/admin/node/admin.auth.UserInfo
57+
- title: "UserMetadata"
58+
path: /docs/reference/admin/node/admin.auth.UserMetadata
59+
- title: "UserRecord"
60+
path: /docs/reference/admin/node/admin.auth.UserRecord
61+
- title: "SessionCookieOptions"
62+
path: /docs/reference/admin/node/admin.auth.SessionCookieOptions
63+
- title: "BaseAuth"
64+
path: /docs/reference/admin/node/admin.auth.BaseAuth
65+
- title: "ListUsersResult"
66+
path: /docs/reference/admin/node/admin.auth.ListUsersResult
67+
68+
- title: "admin.credential"
69+
path: /docs/reference/admin/node/admin.credential
70+
section:
71+
- title: "Credential"
72+
path: /docs/reference/admin/node/admin.credential.Credential
73+
74+
- title: "admin.database"
75+
path: /docs/reference/admin/node/admin.database
76+
section:
77+
- title: "Database"
78+
path: /docs/reference/admin/node/admin.database.Database
79+
- title: "DataSnapshot"
80+
path: /docs/reference/admin/node/admin.database.DataSnapshot
81+
- title: "OnDisconnect"
82+
path: /docs/reference/admin/node/admin.database.OnDisconnect
83+
- title: "Query"
84+
path: /docs/reference/admin/node/admin.database.Query
85+
- title: "Reference"
86+
path: /docs/reference/admin/node/admin.database.Reference
87+
- title: "ServerValue"
88+
path: /docs/reference/admin/node/admin.database.ServerValue
89+
- title: "ThenableReference"
90+
path: /docs/reference/admin/node/admin.database.ThenableReference
91+
92+
- title: "admin.firestore"
93+
path: /docs/reference/admin/node/admin.firestore
94+
95+
- title: "admin.instanceId"
96+
path: /docs/reference/admin/node/admin.instanceId
97+
section:
98+
- title: "InstanceId"
99+
path: /docs/reference/admin/node/admin.instanceId.InstanceId
100+
101+
- title: "admin.messaging"
102+
path: /docs/reference/admin/node/admin.messaging
103+
section:
104+
- title: "TopicMessage"
105+
path: /docs/reference/admin/node/TopicMessage
106+
- title: "TokenMessage"
107+
path: /docs/reference/admin/node/TokenMessage
108+
- title: "ConditionMessage"
109+
path: /docs/reference/admin/node/ConditionMessage
110+
- title: "AndroidConfig"
111+
path: /docs/reference/admin/node/admin.messaging.AndroidConfig
112+
- title: "AndroidNotification"
113+
path: /docs/reference/admin/node/admin.messaging.AndroidNotification
114+
- title: "Messaging"
115+
path: /docs/reference/admin/node/admin.messaging.Messaging
116+
- title: "MessagingConditionResponse"
117+
path: /docs/reference/admin/node/admin.messaging.MessagingConditionResponse
118+
- title: "MessagingDeviceGroupResponse"
119+
path: /docs/reference/admin/node/admin.messaging.MessagingDeviceGroupResponse
120+
- title: "MessagingDeviceResult"
121+
path: /docs/reference/admin/node/admin.messaging.MessagingDeviceResult
122+
- title: "MessagingDevicesResponse"
123+
path: /docs/reference/admin/node/admin.messaging.MessagingDevicesResponse
124+
- title: "MessagingOptions"
125+
path: /docs/reference/admin/node/admin.messaging.MessagingOptions
126+
- title: "MessagingPayload"
127+
path: /docs/reference/admin/node/admin.messaging.MessagingPayload
128+
- title: "MessagingTopicResponse"
129+
path: /docs/reference/admin/node/admin.messaging.MessagingTopicResponse
130+
- title: "MessagingTopicManagementResponse"
131+
path: /docs/reference/admin/node/admin.messaging.MessagingTopicManagementResponse
132+
- title: "NotificationMessagePayload"
133+
path: /docs/reference/admin/node/admin.messaging.NotificationMessagePayload
134+
- title: "MulticastMessage"
135+
path: /docs/reference/admin/node/admin.messaging.MulticastMessage
136+
- title: "WebpushNotification"
137+
path: /docs/reference/admin/node/admin.messaging.WebpushNotification
138+
- title: "WebpushFcmOptions"
139+
path: /docs/reference/admin/node/admin.messaging.WebpushFcmOptions
140+
- title: "DataMessagePayload"
141+
path: /docs/reference/admin/node/admin.messaging.DataMessagePayload
142+
- title: "BatchResponse"
143+
path: /docs/reference/admin/node/admin.messaging.BatchResponse
144+
- title: "SendResponse"
145+
path: /docs/reference/admin/node/admin.messaging.SendResponse
146+
- title: "ApnsConfig"
147+
path: /docs/reference/admin/node/admin.messaging.ApnsConfig
148+
- title: "ApnsPayload"
149+
path: /docs/reference/admin/node/admin.messaging.ApnsPayload
150+
- title: "Aps"
151+
path: /docs/reference/admin/node/admin.messaging.Aps
152+
- title: "ApsAlert"
153+
path: /docs/reference/admin/node/admin.messaging.ApsAlert
154+
- title: "CriticalSound"
155+
path: /docs/reference/admin/node/admin.messaging.CriticalSound
156+
- title: "Notification"
157+
path: /docs/reference/admin/node/admin.messaging.Notification
158+
- title: "WebpushConfig"
159+
path: /docs/reference/admin/node/admin.messaging.WebpushConfig
160+
161+
- title: "admin.projectManagement"
162+
path: /docs/reference/admin/node/admin.projectManagement
163+
section:
164+
- title: "AndroidApp"
165+
path: /docs/reference/admin/node/admin.projectManagement.AndroidApp
166+
- title: "AndroidAppMetadata"
167+
path: /docs/reference/admin/node/admin.projectManagement.AndroidAppMetadata
168+
- title: "AppMetadata"
169+
path: /docs/reference/admin/node/admin.projectManagement.AppMetadata
170+
- title: "IosApp"
171+
path: /docs/reference/admin/node/admin.projectManagement.IosApp
172+
- title: "IosAppMetadata"
173+
path: /docs/reference/admin/node/admin.projectManagement.IosAppMetadata
174+
- title: "ProjectManagement"
175+
path: /docs/reference/admin/node/admin.projectManagement.ProjectManagement
176+
- title: "ShaCertificate"
177+
path: /docs/reference/admin/node/admin.projectManagement.ShaCertificate
178+
179+
- title: "admin.storage"
180+
path: /docs/reference/admin/node/admin.storage
181+
section:
182+
- title: "Storage"
183+
path: /docs/reference/admin/node/admin.storage.Storage

0 commit comments

Comments
 (0)