Awesome to hear that you’re using Gotrue-js and Netlify Identity! We built Identity on open source technologies and are excited to have users in that codebase along with us. Your feedback and contributions will help us make this into a better project and also improve its documentation.
Admin methods like
UpdateUser() won’t work from the frontend because there is no admin access on the frontend. This is done since there was no secure way for you to access these from the frontend (your authentication credentials would be available in the browser for attackers to steal), so we don’t allow it.
However, we do pass:
- an admin token for Identity,
- as well as a URL for your sites Identity API endpoint
…into our lambda functions which you can use to perform admin actions. We have published more information on this in our documentation - I suggest you give it a read through as a starting point.
Managing users is challenging, and functions can be confusing. Let us know if you’re having trouble and share your code and experiences! I’ve written a few functions for validating and inviting users so if you want a peek, just ask.