Netlify Functions missing context

I’m using Netlify Identity with Netlify Functions in one of my projects. When this project is pushed to production, I can see and use context.clientContext.user as described in the docs. However, when I’m using netlify dev locally, the context passed into my function is always an empty object.

To test that I’m using Identity + Functions correctly, I have to keep pushing to production. It would be nice if netlify dev provided the correct context for my function so I could test locally.

Thanks,
~ Dallin

Hi, @numso. There is an open issue for context specific environment variables here:

Please keep in mind that Netlify Dev is in beta and is a work in progress. It is a public repo as well and we do encourage you to file issues as you find them.

I’m also getting clientContext as empty object {} in localhost(netlify dev).
When running on deployed version - clientContext is populated properly.

What do I need to do to get it locally?

Is it just me or anybody else experiencing this problem?

The correct issue is this:

If you’re on a Business plan, I believe you can set custom JWT secret in your site settings and even in CLI which would allow you to do this.

Set a custom JWT? Why and where do I get it? How it’s gonna work I don’t understand

Something like explained here: