vercel / nextjs-subscription-payments

Clone, deploy, and fully customize a SaaS subscription application with Next.js.
https://subscription-payments.vercel.app/
MIT License
5.83k stars 1.19k forks source link

Deprecated! Supabase Auth Helpers #237

Closed guylepage3 closed 9 months ago

guylepage3 commented 11 months ago

This project is now out of date.

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

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.

MincePie commented 11 months ago

is there an example of how to do this?

guylepage3 commented 11 months ago

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

nate-oo commented 10 months ago

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?

guylepage3 commented 10 months ago

@nate-oo Yep. Here's one for example...

https://github.com/vercel/nextjs-subscription-payments/blob/e7e04277f53cdec26fc54fbbba3855a4c21a2b48/app/supabase-server.ts#L6

You can do a search for SupabaseClient to find all the rest.

nate-oo commented 10 months ago

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

and here: https://github.com/vercel/nextjs-subscription-payments/blob/e7e04277f53cdec26fc54fbbba3855a4c21a2b48/app/supabase-server.ts#L7

I could be wrong. Am I missing something?

guylepage3 commented 10 months ago

@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

References as the words SupabaseClient are in each of the helper names.

nate-oo commented 10 months ago

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?

guylepage3 commented 10 months ago

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;

nate-oo commented 10 months ago

Thanks @guylepage3. I am still confused lol. I'll have to do more research to figure this out for myself

guylepage3 commented 10 months ago

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.

micheltucker commented 9 months ago

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.

guylepage3 commented 9 months ago

@micheltucker do what you will. But unless someone has completed the change, then it's incomplete. Zero confusion actually.

micheltucker commented 9 months ago

@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?

guylepage3 commented 9 months ago

It's provided by the supabase folks.. Please re-read. Thx