Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: firebase/firebase-functions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.15.7
Choose a base ref
...
head repository: firebase/firebase-functions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.16.0
Choose a head ref
  • 9 commits
  • 19 files changed
  • 4 contributors

Commits on Sep 20, 2021

  1. Configuration menu
    Copy the full SHA
    1065015 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. GCS Enhancement (#981)

    * inital gcs work
    
    * removing bucket path
    
    * adding tests
    
    * cleaning up and fixing pr issues
    
    * clean up comment
    
    * removing redundant code
    
    * fixing undefined argument bug
    
    * format:fix
    
    * removing apiVersion, changing hidden to internal, and cleaning up tests
    
    * format
    
    * changelog
    colerogers authored Sep 30, 2021
    Configuration menu
    Copy the full SHA
    0479817 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2021

  1. Add an option to disable rejection of requests with invalid App Check…

    … token for callable functions. (#989)
    
    Since releasing App Check integration for Callable Functions, we've received several requests from our users to make it possible turn  App Check enforcement off. By default, if a request includes an App Check token, callable functions will verify the token, and - if the token is invalid - reject the request. This makes it hard for developers to onboard to App Check, especially for developers that want to "soft launch" App Check integration to measure the App Check enforcement would have on its users.
    
    The change here adds a `runWith` option to allow requests with invalid App check token to continue to user code execution, e.g.
    
    ```js
    exports.yourCallableFunction = functions.
      .runWith({
        allowInvalidAppCheckToken: true  // Opt-out: Invalid App Check token cont. to user code.
      }).
      .https.onCall(
      (data, context) => {
        // Requests with an invalid App Check token are not rejected.
        //
        // context.app will be undefined if the request:
        //   1) Does not include an App Check token
        //   2) Includes an invalid App Check token
        if (context.app == undefined) {
          // Users can manually inspect raw request header to check whether an App Check
          // token was provided in the request.
          const rawToken = context.rawRequest.header['X-Firebase-AppCheck'];
          if (rawToken == undefined) {
            throw new functions.https.HttpsError(
                'failed-precondition',
                'The function must be called from an App Check verified app.'
            );
          } else {
            throw new functions.https.HttpsError(
                'unauthenticated',
                'Provided App Check token failed to validate.'
            );
          }
        },
      }
    );
    ```
    taeold authored Oct 14, 2021
    Configuration menu
    Copy the full SHA
    63bd14d View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2021

  1. Add debug mode (#992)

    Debug mode is intended to be used by the Functions Emulator to enable/disable certain aspect of the Functions SDK. Debug mode allows the Functions SDK to operate in development friendly way without the need to monkey-patch the Functions SDK. For example, auth or App Check token verification can be disabled during development to make Functions SDK compatible with the Auth Emulator.
    
    This feature is intended for internal use-cases and won't expose any public interfaces. No one outside the Firebase team should use it, and if they do, we can't promise any stability or feature support.
    taeold authored Oct 18, 2021
    Configuration menu
    Copy the full SHA
    ede96e6 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2021

  1. Fix docgen script (#990)

    taeold authored Oct 19, 2021
    Configuration menu
    Copy the full SHA
    11e045a View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. Allow firebase-admin v10. Add integration tests for Node 16 (#998)

    * Allow firebase-admin v10. Add integration tests for Node 16
    
    * Add changelog. Run formatter
    
    * rerun formatter
    inlined authored Oct 25, 2021
    Configuration menu
    Copy the full SHA
    43e68af View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2021

  1. Fix bug where onCall handler failed to encode returned value that con…

    …tained a function (#1000)
    
    In #915, we replaced use of `_.isObject(data)` with `typeof data === 'object'`. 
    
    Turns out that `_.isObject` returns `true` for functions ([code](https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/isObject.js#L26)). We update the condition to match the previous behavior.
    
    Fixes #964
    taeold authored Oct 28, 2021
    Configuration menu
    Copy the full SHA
    87472f3 View commit details
    Browse the repository at this point in the history
  2. Allow callable functions to skip token verification in debug mode (#983)

    To replace monkey-patching of the Firebase Functions SDK in the Functions Emulator ([code](https://github.com/firebase/firebase-tools/blob/c2feb0836f6f64236e117f2906ef6083840e212b/src/emulator/functionsEmulatorRuntime.ts#L401-L496)), we provide native support for bypassing token verification for `onCall` handlers.
    
    Using the new debug mode introduced in #992, Auth/App Check token included in the request will be decoded but no verified.
    taeold authored Oct 28, 2021
    Configuration menu
    Copy the full SHA
    9c2142b View commit details
    Browse the repository at this point in the history
  3. 3.16.0

    google-oss-bot committed Oct 28, 2021
    Configuration menu
    Copy the full SHA
    24e4c20 View commit details
    Browse the repository at this point in the history
Loading