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.