@netlify/auth0 function withAuth0 references non-existent identityContext property on the context object

I am trying to set up Auth0 authentication for my site using the Auth0 integration.

There is a package (@netlify/auth0), that has a function (withAuth0) that is used to protect Netlify functions. There is a tutorial here that references the function: Auth0 By Okta Integration

I’m running Netlify Dev on my local machine and am getting a HTTP 401 every time I try to access a function that is protected with the withAuth0 function.

I tried debugging, and this appears to be the offending piece of code:

        if (!context.identityContext) {
            if (required) {
                return {
                    statusCode: 401,
                };
            }
        }

I do not see an identityContext property on the context object.

Here is a link to the NPM package that contains the code above: @netlify/auth0

Is there a configuration that I am missing somewhere with regard to my functions that is causing this? I tried updating all of my packages, including @netlify/functions, to the latest versions and I am still seeing the same issue.

I’m not sure where that indetityContext comes from and why they added it. In the past, we used to have that in context.clientContext.identity, but this was udated a few months ago to the example here: Functions and Identity | Netlify Docs