Skip to content
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

Always send our auth token on Node, and always send an appcheck token if we have one. #5082

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

jsdt
Copy link
Contributor

@jsdt jsdt commented Jun 30, 2021

this.nodeAdmin does not always appear to be set when it should be, which is breaking the admin SDK for users with appcheck enforced. This should be more robust, since we always send whatever credentials the client has.

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here.
    If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help
    us make Firebase APIs better, please propose your change in an issue so that we
    can discuss it together.

@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2021

🦋 Changeset detected

Latest commit: 68bb9aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/database Patch
firebase Patch
@firebase/rules-unit-testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2021

Changeset File Check ⚠️

  • Changeset formatting error in following file:
    Package "firebase-compat-typings-test" must depend on the current version of "firebase-exp": "9.0.0-beta.6" vs "file:../../packages-exp/firebase-exp"
    Package "firebase-compat-typings-test" must depend on the current version of "firebase-exp": "9.0.0-beta.6" vs "file:../../packages-exp/firebase-exp"
    Package "firebase-compat-typings-test" must depend on the current version of "firebase-exp": "9.0.0-beta.6" vs "file:../../packages-exp/firebase-exp"
    Error: Failed to find where HEAD diverged from master. Does master exist?
        at async getChangedFilesSince (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/@changesets/git/dist/git.cjs.dev.js:169:22)
        at async Object.getChangedPackagesSinceRef (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/@changesets/git/dist/git.cjs.dev.js:208:24)
        at async getStatus (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/@changesets/cli/dist/cli.cjs.dev.js:977:27)
        at async run$1 (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/@changesets/cli/dist/cli.cjs.dev.js:1227:11)
    

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 30, 2021

Size Analysis Report

Affected Products

Diffs between base commit (74ed43d) and head commit (eb111f9) are too large (111,942 characters) to display.

Please check below links to see details from the original test log.

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a changeset, otherwise this will not get released.

@jsdt jsdt requested a review from egilmorez as a code owner July 2, 2021 17:30
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 2, 2021

Binary Size Report

Affected SDKs

  • @firebase/analytics

    Type Base (74ed43d) Head (eb111f9) Diff
    esm2017 ? 18.7 kB ? (?)
    main ? 24.2 kB ? (?)
    module ? 23.4 kB ? (?)
  • @firebase/api-documenter

    Type Base (74ed43d) Head (eb111f9) Diff
    main ? 3.72 kB ? (?)
  • @firebase/app

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 11.0 kB ? (?)
    esm2017 ? 9.80 kB ? (?)
    lite ? 8.93 kB ? (?)
    lite-esm2017 ? 7.93 kB ? (?)
    main ? 10.1 kB ? (?)
    module ? 11.0 kB ? (?)
    react-native ? 9.86 kB ? (?)
  • @firebase/app-check

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 22.5 kB ? (?)
    esm2017 ? 18.7 kB ? (?)
    main ? 22.5 kB ? (?)
    module ? 22.1 kB ? (?)
  • @firebase/auth

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 181 kB ? (?)
    main ? 181 kB ? (?)
    module ? 181 kB ? (?)
  • @firebase/component

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 8.33 kB ? (?)
    esm2017 ? 6.32 kB ? (?)
    main ? 8.67 kB ? (?)
    module ? 8.33 kB ? (?)
  • @firebase/database

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 296 kB ? (?)
    esm2017 ? 265 kB ? (?)
    main ? 299 kB ? (?)
    module ? 296 kB ? (?)
  • @firebase/database-compat

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 86.5 kB ? (?)
    main ? 103 kB ? (?)
    module ? 86.5 kB ? (?)
  • @firebase/database-exp

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 246 kB ? (?)
    main ? 278 kB ? (?)
    module ? 246 kB ? (?)
  • @firebase/firestore

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 284 kB ? (?)
    esm2017 ? 226 kB ? (?)
    main ? 531 kB ? (?)
    module ? 284 kB ? (?)
    react-native ? 226 kB ? (?)
  • @firebase/firestore-compat

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 29.0 kB ? (?)
    main ? 38.1 kB ? (?)
    module ? 29.0 kB ? (?)
    react-native ? 28.7 kB ? (?)
  • @firebase/firestore-exp

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 224 kB ? (?)
    main ? 510 kB ? (?)
    module ? 224 kB ? (?)
    react-native ? 224 kB ? (?)
  • @firebase/firestore-lite

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 72.5 kB ? (?)
    main ? 149 kB ? (?)
    module ? 72.5 kB ? (?)
    react-native ? 72.8 kB ? (?)
  • @firebase/firestore/bundle

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 290 kB ? (?)
    esm2017 ? 177 kB ? (?)
    main ? 527 kB ? (?)
    module ? 290 kB ? (?)
    react-native ? 177 kB ? (?)
  • @firebase/firestore/memory

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 216 kB ? (?)
    esm2017 ? 172 kB ? (?)
    main ? 325 kB ? (?)
    module ? 216 kB ? (?)
    react-native ? 172 kB ? (?)
  • @firebase/firestore/memory-bundle

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 224 kB ? (?)
    esm2017 ? 177 kB ? (?)
    main ? 322 kB ? (?)
    module ? 224 kB ? (?)
    react-native ? 177 kB ? (?)
  • @firebase/functions

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 10.7 kB ? (?)
    esm2017 ? 8.21 kB ? (?)
    main ? 11.1 kB ? (?)
    module ? 10.7 kB ? (?)
  • @firebase/installations

    Type Base (74ed43d) Head (eb111f9) Diff
    esm2017 ? 16.6 kB ? (?)
    main ? 22.2 kB ? (?)
    module ? 21.6 kB ? (?)
  • @firebase/logger

    Type Base (74ed43d) Head (eb111f9) Diff
    esm2017 ? 3.25 kB ? (?)
    main ? 5.40 kB ? (?)
    module ? 4.65 kB ? (?)
  • @firebase/messaging

    Type Base (74ed43d) Head (eb111f9) Diff
    esm2017 ? 26.2 kB ? (?)
    main ? 34.9 kB ? (?)
    module ? 34.4 kB ? (?)
  • @firebase/performance

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 27.7 kB ? (?)
    esm2017 ? 25.9 kB ? (?)
    main ? 28.0 kB ? (?)
    module ? 27.7 kB ? (?)
  • @firebase/polyfill

    Type Base (74ed43d) Head (eb111f9) Diff
    main ? 747 B ? (?)
    module ? 705 B ? (?)
  • @firebase/remote-config

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 22.4 kB ? (?)
    esm2017 ? 17.4 kB ? (?)
    main ? 23.0 kB ? (?)
    module ? 22.4 kB ? (?)
  • @firebase/rules-unit-testing

    Type Base (74ed43d) Head (eb111f9) Diff
    main ? 15.3 kB ? (?)
  • @firebase/storage

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 63.7 kB ? (?)
    esm2017 ? 54.9 kB ? (?)
    main ? 64.1 kB ? (?)
    module ? 63.7 kB ? (?)
  • @firebase/storage-compat

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 10.3 kB ? (?)
    main ? 29.3 kB ? (?)
    module ? 10.3 kB ? (?)
  • @firebase/storage-exp

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 51.6 kB ? (?)
    main ? 53.0 kB ? (?)
    module ? 51.6 kB ? (?)
  • @firebase/util

    Type Base (74ed43d) Head (eb111f9) Diff
    browser ? 21.2 kB ? (?)
    esm2017 ? 19.9 kB ? (?)
    main ? 25.8 kB ? (?)
    module ? 21.2 kB ? (?)
  • @firebase/webchannel-wrapper

    Type Base (74ed43d) Head (eb111f9) Diff
    esm2017 ? 43.2 kB ? (?)
    main ? 50.7 kB ? (?)
    module ? 44.8 kB ? (?)
  • firebase

    Click to show 16 binary size changes.
    Type Base (74ed43d) Head (eb111f9) Diff
    firebase-analytics.js ? 35.7 kB ? (?)
    firebase-app-check.js ? 22.8 kB ? (?)
    firebase-app.js ? 21.9 kB ? (?)
    firebase-auth.js ? 177 kB ? (?)
    firebase-database.js ? 187 kB ? (?)
    firebase-firestore.js ? 336 kB ? (?)
    firebase-firestore.memory.js ? 271 kB ? (?)
    firebase-functions.js ? 10.9 kB ? (?)
    firebase-installations.js ? 19.3 kB ? (?)
    firebase-messaging.js ? 40.9 kB ? (?)
    firebase-performance-standalone.es2017.js ? 73.4 kB ? (?)
    firebase-performance-standalone.js ? 49.8 kB ? (?)
    firebase-performance.js ? 38.3 kB ? (?)
    firebase-remote-config.js ? 36.9 kB ? (?)
    firebase-storage.js ? 41.6 kB ? (?)
    firebase.js ? 893 kB ? (?)

Test Logs

.changeset/silent-seals-approve.md Outdated Show resolved Hide resolved
Co-authored-by: Sebastian Schmidt <mrschmidt@google.com>
@jsdt jsdt merged commit 99414a5 into master Jul 2, 2021
@jsdt jsdt deleted the jsdt/node-auth-token branch July 2, 2021 20:33
@google-oss-bot google-oss-bot mentioned this pull request Jul 8, 2021
@firebase firebase locked and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants