Netlify Dev + Netlify Identity/GoTrue API and local development


I’m using Netlify Dev to develop some lambda functions that will help manage users in a Gastby Static Site/SPA. I want to check I have understood a limitation of the local testing correctly?

My Admins have an authenticated page where I fetch a list of all the users and make some changes to the app_metadata for each user (for example role changes).

I am using code very much like the examples in the goTrue API documents:
Update a User

Get a list of users

However, these do not work from my local netlify dev environment as they produce a token error for the passed identity; instead I have to deploy to a site preview and develop/debug there.

Is there a way to get calls to the gotrue identity API working from a local environment, or will this just have to be my workflow for this feature?


Hi @DixonsCRC, welcome to the community!

Regarding your question, I think the methods you mention are admin methods so they can only be used within a lambda function. As such, I don’t know how you would test it locally. Perhaps one of the existing issues is related to yours: If not, you may want to file an issue?

Let me know if that helps?