Skip to content

Merging changes with master. #553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ language: node_js
node_js:
- "10"
- "8"
- "7"
- "6"
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

-

# v8.0.0

- [changed] Dropped support for Node 6. Developers must use Node 8.13.0 or
higher.
- [changed] Upgraded Cloud Firestore client to v2.0.0.

# v7.4.0

- [changed] Upgraded Cloud Firestore client to v1.3.0.

# v7.3.0

- [feature] Added the provider config management APIs for managing OIDC and SAML
Expand Down
49 changes: 33 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ information on using pull requests.

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

### Prerequisites

1. Node.js 8.13.0 or higher.
2. NPM 5 or higher (NPM 6 recommended).
3. Google Cloud SDK ([`gcloud`](https://cloud.google.com/sdk/downloads) utility)

### Initial Setup

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

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

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

The integration test suite requires a service account JSON key file, and an API key for a Firebase
project. Create a new project in the [Firebase console](https://console.firebase.google.com) if
you do not already have one. Use a separate, dedicated project for integration tests since the
test suite makes a large number of writes to the Firebase realtime database. Download the service
account key file from the "Settings > Service Accounts" page of the project, and copy it to
`test/resources/key.json`. Also obtain the API key for the same project from "Settings > General",
and save it to `test/resources/apikey.txt`.

Some Auth integration tests require that you enable the IAM API for your Firebase/GCP project,
and grant your service account ID the "Service Account Token Creator" role. These must be done
via the Google Cloud Console. Refer to the
[troubleshooting instructions](https://firebase.google.com/docs/auth/admin/create-custom-tokens#troubleshooting)
in the official documentation for more details on how to achieve this.
The integration tests run against an actual Firebase project. Create a new
project in the [Firebase Console](https://console.firebase.google.com), if you
do not already have one suitable for running the tests against. Then obtain the
following credentials from the project:

1. *Service account certificate*: This can be downloaded as a JSON file from
the "Settings > Service Accounts" tab of the Firebase console. Copy the
file into the repo so it's available at `test/resources/key.json`.
2. *Web API key*: This is displayed in the "Settings > General" tab of the
console. Copy it and save to a new text file at `test/resources/apikey.txt`.

Then set up your Firebase/GCP project as follows:

1. Enable Firestore: Go to the Firebase Console, and select "Database" from
the "Develop" menu. Click on the "Create database" button. You may choose
to set up Firestore either in the locked mode or in the test mode.
2. Enable password auth: Select "Authentication" from the "Develop" menu in
Firebase Console. Select the "Sign-in method" tab, and enable the
"Email/Password" sign-in method.
3. Enable the IAM API: Go to the
[Google Cloud Platform Console](https://console.cloud.google.com) and make
sure your Firebase/GCP project is selected. Select "APIs & Services >
Dashboard" from the main menu, and click the "ENABLE APIS AND SERVICES"
button. Search for and enable the "Identity and Access Management (IAM)
API".

Finally, to run the integration test suite:

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ requests, code review feedback, and also pull requests.

## Supported Environments

We support Node.js 6.0 and higher. Please note that the Admin SDK should only
We support Node.js 8.13.0 and higher.

Please also note that the Admin SDK should only
be used in server-side/back-end environments controlled by the app developer.
This includes most server and serverless platforms (both on-premise and in
the cloud). It is not recommended to use the Admin SDK in client-side
Expand Down
Loading