I am quite new to all this and I’d like to confirm if my mental model of the Netlify Identity ecosystem is accurate. If I understand correctly:
Netlify Identity is a service that allows for user registration and authentication. We could think of it as, roughly, a database where developers using Netlify can store records of users that register on their site . We can sort of understand the scope of the service by seeing what possibilities it offers at https://app.netlify.com/sites/{mysite}/configuration/identity and those possibilities are: CRUD users, send verification emails, etc.
The GoTrue API is an interface that specifies an exchange protocol for accessing the said database. It is a subcomponent of Netlify Identity and it is an integral element of the service.
GoTrue.js is a helper library that simplifies working the the GoTrue API from the front end but is not required and one could work with the API directly if they so wanted.
The Netlify Identity Widget is a pre-built, ready-to-use, and customizable login modal that one could choose to use to speed up development. Like with the GoTrue.js library, using it is optional.
Would you say this is accurate? Could one roll their own solution using only Netlify Identity and the GoTrue API, and skip the library and the widget and write their own front-end code instead? And are Netlify Identity and the GoTrue API roughly synonymous and are essentially the same thing?
GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects.
What makes an API self-standing? How could one use the GoTrue API without the Netlify Identity service?
I just really want to make sure my understanding of the system components is correct. Thanks in advance for any corrections and tips!
@nathanmartin, thanks. So is the takeaway to not use Netlify Identity because it will likely be deprecated? Do you know of any viable and supported alternatives?
Would you say that my understanding of the Netlify Identity ecosystem was accurate? I am curious mostly for general learning about how web services are architected.
GoTrue is the actual backend that handles the authentication and Netlify Identity is a feature we built around it that provides helper API methods. You can use client-side JS to make API calls to Netlify Identity which will make the connections to GoTrue API. GoTrue can be deployed as a standalone instance on your own server and then you can get rid of Netlify Identity as well.
As far as I’m aware, Supabase Auth is a forked version of Netlify’s GoTrue, so that’s an example that can be built using the GoTrue API.
With that being said, Nathan is right and Identity is being deprecated. You can use other alternatives like Auth0, Clerk, etc.
Hey guys, I am back with a follow-up question. Do I have to upgrade to a paid Netlify plan if I want to implement role-based access using an external provider instead of the soon-to-be-deprecated Netlify Identity? The docs seem to imply so.