dijonmusters / build-a-saas-with-next-js-supabase-and-stripe

290 stars 68 forks source link

Is the egghead tutorial still current? #10

Open MincePie opened 1 year ago

MincePie commented 1 year ago

I'm trying to learn from this egghead tutoiral: https://egghead.io/lessons/supabase-query-data-from-supabase-using-next-js

I am not able to read from the supabase database as per lesson 4. I have changed the nextjs version in package.json from latest to v 13.0.2 . Whilst this clears the errors in the terminal and the console, I can only read an empty array when I console log the output of the lesson table.

Maybe this tutorial is no longer current. Is that the case? Do you know if there are any changes that can be made to continue trying to learn some principles from the tutorial - or is it too out of date to be a starting point to learn?

I have been trying to learn basics for 10+ years and am yet to find a current resource that I can understand (I need CS50, replit 100 days of code level dummies explanations). If this is out of date, I wont keep trying to figure out what's going wrong, but if there are small changes that can be made to make this useful - I very much like the tutor's style so far and would like to try and learn.

ghiden commented 1 year ago

I had the same issue. You need to disable RLS in the table configuration.

jinsley8 commented 1 year ago

@MincePie - In the supabase-js v2 update, the cookies and auth method have changed and the newest Stripe Checkout setup is slightly different than what is explained in the course at the moment.

I have an updated course repo: https://github.com/jinsley8/nextjs-supabase-stripe-saas

laurencebedford commented 1 year ago

@MincePie - In the supabase-js v2 update, the cookies and auth method have changed and the newest Stripe Checkout setup is slightly different than what is explained in the course at the moment.

I have an updated course repo: https://github.com/jinsley8/nextjs-supabase-stripe-saas

I agree this is completely outdated my only issue is everything else is working for mer right upto video 19 where we are using the axis api and setAuthCookie - this function was removed but what do I use instead? Ive looked at your repo and you haven't used the cookie at all?

callmejumeh commented 11 months ago

https://github.com/jinsley8/nextjs-supabase-stripe-saas

I don't think you need to set any cookie anymore thanks to the auth helpers functions.

Through createServerSupabaseClient you can get the authenticated user from the session server side.

Correct me if I'm wrong @jinsley8 ;)

jinsley8 commented 11 months ago

@callmejumeh @laurencebedford the repo I posted uses the auth helpers. I haven't updated it in 7 months though but it should still work.

laurencebedford commented 11 months ago

@callmejumeh @laurencebedford the repo I posted uses the auth helpers. I haven't updated it in 7 months though but it should still work.

Ah it's so annoying I didn't get this GitHub notif so been sitting on this issue for a while. I will check this out now.