Supabase auth examples on github includes two very...
# javascript
e
Supabase auth examples on github includes two very different methods: https://github.com/supabase/supabase/blob/master/examples/nextjs-auth/pages/profile.js vs https://github.com/supabase/supabase/blob/master/examples/nextjs-auth-tailwind/pages/profile.js Does anyone know which of these approaches, both apparently endorsed by supabase, is preferred?
s
The current preferred method is to use the supabase-auth-helpers as this makes it easier to deal with server-side auth state management too. There is an example on its repo here https://github.com/supabase-community/supabase-auth-helpers/tree/main/src/nextjs
e
How on earth did I not see this anywhere in the docs lol - supabase is amazing but the documentation is so inconsistent 😓 .. thanks for the heads up
s
This is a new addition to the supabase js ecosystem, we are constantly working on making the developer experience as enjoyable as possible. Yes the documentation can do with a bit of work, this is something we have on our radar and will be doing some work on in coming months.