Hiya, sorry you are having trouble with your build.
This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.
We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!
If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!
I’m simply calling a notify function and console.log the context: you can see that identify is null. This is on localhost. When it’s live on production, identity is there and filled in.
It is, if you set a custom JWT secret in your site settings (requires a Business plan as of today). Then, you can set the same JWT secret in netlify.toml and it would work. This is only needed if you wish to test CLI using the same production Identity instance. If you simply want to test the flow, you can set a random JWT secret and that should work as long as you generate your own JWTs with that signature.
I got it to work to get the token in a local environment BUT when I call admin functions of the Gotrue API like listusers (${identity.url}/admin/users?per_page=500), I get a 401 error. That same codebase is working in prod to list all users.
Can you tell me: are you making that call from a Netlify function?
As far as I know, you’d only have administrative permissions to use GoTrue API calls like this from inside a Netlify Lambda function running on the same site (versus you doing something like a direct curl of the URL you mention - https://sitename.com/.netlify/identity/admin/users from your own machine).