Closed guylepage3 closed 9 months ago
is there an example of how to do this?
There are links to the documentation on how to use the helpers and there is this very light weight run through here: https://supabase.com/docs/guides/auth/auth-helpers/nextjs
Hi @guylepage3
I was looking at this and trying to figure out what the update process might be like. However, I don't see the old deprecated function names like you are referring to in the code within the repo.
Unless I am missing something (I could be...I am relatively new to web development), it looks like all the new functions names are being used throughout the repo.
Could you point out some lines of code and file names that you are referring to that use the deprecated functions?
@nate-oo Yep. Here's one for example...
You can do a search for SupabaseClient
to find all the rest.
Thanks @guylepage3 isn't that just the custom name of the constant though?
That exports a constant that is a custom defined function with the name of createServerSupabaseClient
for use throughout the application doesn't it?
The actual nextjs helper used is createServerComponentClient
like you see here in that file:
https://github.com/vercel/nextjs-subscription-payments/blob/e7e04277f53cdec26fc54fbbba3855a4c21a2b48/app/supabase-server.ts#L2
I could be wrong. Am I missing something?
@nate-oo Please re-read what I wrote.
You can do a search for SupabaseClient to find all the rest.
As in you'll see the
SupabaseClient
SupabaseClient
SupabaseClient
References as the words SupabaseClient
are in each of the helper names.
Thanks @guylepage3. I guess I am confusing myself :). Sorry I'm new trying to figure this out.
Isn't everything that has the words SupabaseClient
in this repo actually just names of constants
and not the actual imported helpers
?
Nope. But SupabaseClient
is a constant. Someone decided it was a good idea to name one of the constants part of the name of the helpers. Just to confuse everyone. Lol.
I thought I could save you some time but just do 3 searches instead of just one.
Search for;
createBrowserSupabaseClient
createMiddlewareSupabaseClient
createServerSupabaseClient
Thanks @guylepage3. I am still confused lol. I'll have to do more research to figure this out for myself
Lmao. Please read ALL the links I created in my initial comment.
I provided all the links to the deprecated posts from Supabase.
It's not confusing at all.
I stumbled upon this issue, but also find it confusing, similar to @nate-oo . The repo seems to have the correct helpers. Might be good to close this, as this might be confusing for others as well.
@micheltucker do what you will. But unless someone has completed the change, then it's incomplete. Zero confusion actually.
@micheltucker do what you will. But unless someone has completed the change, then it's incomplete. Zero confusion actually.
Would you mind sharing one diff of your proposed change?
It's provided by the supabase folks.. Please re-read. Thx
Supabase deprecated the Auth Helpers used in this project and now requires quite a bit of refactoring / restructuring.
Deprecated helpers currently used in this app
createBrowserSupabaseClient
createMiddlewareSupabaseClient
createServerSupabaseClient
New Helpers
Secondly, since Supabase Auth UI is in
beta
and only offers nominal views, the auth functionality is not usable as of yet. Users cannot update passwords, email addresses, etc. Leaving the developer to build out Auth from scratch. Supabase is great but this project should build out Supabase Auth views on its own.