What does HackerNews think of gotrue?

A JWT based API for managing users and issuing JWT tokens

Language: Go

#70 in Go
PSA: Supabase Auth is based on their fork [0] of Netlify's Gotrue [1]. If you are migrating out of Supabase completely you can just drop in Gotrue for authentication.

[0]: https://github.com/supabase/gotrue

[1]: https://github.com/netlify/gotrue

we integrated Gotrue with PostgREST at Supabase and it works beautifully together https://github.com/supabase/gotrue (forked from Netlify)
For more context, here is the the GoTrue repo: https://github.com/supabase/gotrue

You can see how it fits into the full Supabase Architecture here: https://supabase.com/docs/guides/getting-started/architectur...

The advantage of ORY was that it required this somewhat custom frontend (since it's not password based) -- I'm not sure how much easier that would have been with Keycloak (my guess is it would have been harder), and I haven't used Authentik before so I'm not sure.

Keycloak is definitely more setup and a bit more clunky. I've never deployed Authentik though, I really need to kick the wheels on it and see how it works.

BTW in the simple auth/login space there is also:

- Keratin[0]

- GoTrue[1] (and Supabase's improved version[2])

- Authelia[3]

[0]: https://keratin.github.io/authn-server/#/

[1]: https://github.com/netlify/gotrue

[2]: https://github.com/supabase/gotrue

[3]: https://github.com/authelia/authelia

In Supabase we use a separate Auth server [0]. This stores the user in an `auth` schema, and these users can login to receive a JWT. Inside the JWT is a "role", which is, in fact, a PostgreSQL role ("authenticated") that has certain grants associated to it, and the user ID (a UUID).

Inside your RLS Policies you can use anything stored inside the JWT. My cofounder made a video [1] on this which is quite concise. Our way of handling this is just an extension of the PostgREST Auth recommendations: https://postgrest.org/en/v9.0/auth.html

[0] Auth server: https://github.com/supabase/gotrue

[1] RLS Video: https://supabase.com/docs/learn/auth-deep-dive/auth-row-leve...

{supabase ceo}

You can! A lot of people do. Or you can use the Auth server directly: https://github.com/supabase/gotrue

We run a fork of GoTrue, using the migrations in this PR:

https://github.com/netlify/gotrue/pull/254

tbh, our fork[1] has deviated a bit from Netlify's so we need to spend some time with them upstream'ing any changes that they would want to merge (perhaps magic links, Azure logins, OAuth scopes).

Long term, I think we will need to run 2 different forks because we have different requirements for multi-tenant. So the benefit here would be sharing "OAuth providers" (eg, if we add Okta, we upstream it, if they add Twitter logins, we pull it)

[1] https://github.com/supabase/gotrue

Thanks!

> magic link

We have this one available here:

https://supabase.io/docs/reference/javascript/auth-signin#si...

We don't have OTP, but that's a great idea - something we can add to GoTrue (https://github.com/supabase/gotrue)

https://supabase-slack-clone.vercel.app/

This is a real-time Slack clone built with Postgres' Row Level Security. It's a simple POC, and you can deploy your own, which takes a few minutes. The database, auth, real-time, and APIs are handled by Supabase, which is an open source Firebase alternative (disclaimer: I work at Supabase). The front end is built with Next.js, deployed on Vercel.

Supabase just released Auth. We use Netlify's GoTrue[1] for authentication. When you spin up a Postgres database on our platform we populate it with an auth schema, turn on the relevant extensions, and add some helper functions - signup, login, etc. When a user signs up to your app, they are assigned a UUID and issued a JWT, which contains the role `authenticated` and their UUID. We can use these details to provide fine-grained authorization for each user using Postgres' Row Level Security.

RLS is a bit confusing at first, so the next month's work will be improving our Auth system to make it extremely simple to use. And documentation :)

[1] https://github.com/supabase/gotrue