Тёмный

Supabase + Next.js ULTIMATE Auth Combo 

The Dev Logger
Подписаться 93
Просмотров 1,5 тыс.
50% 1

🔒 Secure User Authentication with Supabase and Next.js 🌐
Are you ready to build a modern web application with seamless user authentication? In this video, we'll walk you through the process of integrating Supabase auth with Next.js and creating a sleek user interface using Shadcn UI.
🚀 What You'll Learn:
- Setting up Supabase authentication in a Next.js app
- Configuring Google as an authentication provider through Supabase
- Creating a clean and intuitive user interface with Shadcn UI components
- Implementing secure server-side rendering (SSR) for authenticated pages
📝 Resources:
- Google Cloud Console: console.cloud.google.com/
- Supabase SSR Auth for Next.js: supabase.com/docs/guides/auth...
- Shadcn UI Blocks: ui.shadcn.com/blocks
💻 Code Snippets:
We've provided code snippets for various parts of the project, including the Supabase client setup, middleware configuration, authentication actions, and more. Check the description below for links to the snippets on [Ray.so](ray.so/).
[0] Link to Supabase Profiles Table Statement: ray.so/oowaXXp
[1] utils/supabase/client.ts ray.so/tJDUFyf
[2] utils/supabase/server.ts ray.so/zCENWNw
[3] utils/supabase/middleware.ts ray.so/ogqZSxd
[4] ./middleware.ts ray.so/4W0KZh0
[5] lib/auth-actions.ts ray.so/4dOJMOJ
[6] app/error/page.tsx ray.so/sEDQPGF
[7] app/(auth)/auth/confirm/route.ts ray.so/YiFaRSF
[8] Supabase confirm signup template ray.so/59O0zjT
[9] app/(auth)/login/components/LoginForm.tsx ray.so/uDTklnQ
[10] app/(auth)/login/components/SignInWithGoogleButton.tsx ray.so/Km9O7Hu
[11] app/(auth)/signup/components/SignUpForm.tsx ray.so/hfLy1o8
[12] app/(auth)/logout/page.tsx ray.so/GPoeLVJ
[13] components/LoginLogoutButton.tsx ray.so/GQpLnYP
[14] components/UserGreetText.tsx ray.so/Ig6NjPR
[15] app/page.tsx ray.so/fu9gLKL
⏱️ Timecodes
0:22 - Creating Project
0:50 - Setup Supabase with Google Auth
2:06 - Add Supabase to Next.js Project
3:52 - Setup Auth UI
7:02 - Running the Project
7:57 - Final Thoughts
Github Repo: github.com/TheDevLogger/nextj...

Опубликовано:

 

30 апр 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@rnholykabye9455
@rnholykabye9455 20 дней назад
Brilliant work. Thank you Sir!
@diegogimbernat9253
@diegogimbernat9253 9 дней назад
Great tutorial man really clean
@TheDevLogger
@TheDevLogger 9 дней назад
Thank you!!
@anuj7286
@anuj7286 17 дней назад
Great tutorial, quick to understand. Thank you!
@TheDevLogger
@TheDevLogger 17 дней назад
Glad it helped!
@fdkaix9091
@fdkaix9091 2 месяца назад
Hello The Dev Logger, congrats on your channel. Super useful content, high quality of articulation and presentation. I am sure you will grow big, keep going. Looking forward to watch more nextjs content coming from you. Greetings from Turkey.
@TheDevLogger
@TheDevLogger 2 месяца назад
Thank you so much for your kind words! Really appreciate the support ❤️
@akadaygame8634
@akadaygame8634 14 дней назад
thank you, really helpfull and rally good explanation..
@TheDevLogger
@TheDevLogger 14 дней назад
Your very welcome :)
@JeffreyHo565
@JeffreyHo565 Месяц назад
Awesome video, thanks, applied your examples to my next.js project
@TheDevLogger
@TheDevLogger Месяц назад
Your welcome! Glad it was helpful to you :)
@JeffreyHo565
@JeffreyHo565 Месяц назад
@@TheDevLogger The only callout that I am realizing now is that the LoginLogoutButton isn't really signing out the user. You are using setting the user state as null. You need to call the signOut method from the supabase client library
@TheDevLogger
@TheDevLogger Месяц назад
Thanks for pointing that out! I guess I missed adding that part to the video
@codewithguillaume
@codewithguillaume 17 дней назад
This is a good video! :)
@LutherDePapier
@LutherDePapier 16 дней назад
That thumbnail... 😂😂😂😂
@codingjogo
@codingjogo 7 дней назад
Your tutorial is great but no zooming in to see what’s going on to the small text
@codingjogo
@codingjogo 7 дней назад
Hope u add zoom to scale those small text components etc thanks!!!
@TheDevLogger
@TheDevLogger 7 дней назад
Thank you for the compliment! Haha yeah I realized that after I’ve edited the video 🤣
@chenjus
@chenjus 16 дней назад
Im new to Supabase. So I can just use Supabase as a remote database and Auth service, right? Im thinking of using FastAPI with Docker and using Supabase just for Auth and object storage. Is that a typical architecture?
@TheDevLogger
@TheDevLogger 16 дней назад
To my understanding you can use as much or as little of the services supabase provides as you want. You may want to look into using Supabase Edge Functions if you are building APIs, I haven’t used FastAPI before but I would guess that maybe the equivalent? Additionally if you are going to run a docker container anyway, you might as well self-host supabase
@StephenRayner
@StephenRayner 17 дней назад
Decent thank you, I ran into an issue where sometimes when logging in it would put the users password in the url! 😮 I will take a look at how you’ve done it compared to my setup and see if it addresses the problem.
@TheDevLogger
@TheDevLogger 17 дней назад
Ohh… that doesn’t sound right haha 😂 Let me know if you’d like me to create a GitHub repo with the example project and add it to the description
@StephenRayner
@StephenRayner 15 дней назад
@@TheDevLoggerthat will be helpful. I can test your flow then slowly add my code into it to identify the root cause. One variation on my end is I’m using email with not the providers. But I doubt it is that. I also used the middle chain pattern. (Can share this with you if you like) but it was broken before that refactor if I remember rightly. Will try to remember to update you. On holiday atm. Will circle back within a month.
@TheDevLogger
@TheDevLogger 15 дней назад
@@StephenRayner It's in the description! Just let me know if you find any issues with it
@AverageJohnny
@AverageJohnny 15 дней назад
40th subscriber 🎉 Could you create a git repo with the code? I've followed the steps but the login button keeps calling the logout function, so I guess I did something wrong.
@TheDevLogger
@TheDevLogger 15 дней назад
haha thank you for the support! I've added the repo to the description. Let me know if it still doesn't work for you.
@AverageJohnny
@AverageJohnny 14 дней назад
@@TheDevLogger Thank you! I literally put the code for the logout in the login page, no wonder it was acting that way 😂 Do you have a twitter where we can follow you for updates and new videos?
@TheDevLogger
@TheDevLogger 14 дней назад
@@AverageJohnny No problem! hahaha I make those silly mistakes all the time too. Instagram is probably where I'll be doing more frequent updates during the week. I haven't set that up yet but hopefully maybe within the next video or the video after there'll be a link in the description! I have soo many content ideas, it would be super cool to engage with you and everyone here to see what would be most helpful :)
@AverageJohnny
@AverageJohnny 12 дней назад
@@TheDevLogger I would definetlly recommend posting on X as well, dev community there is huge. As for a video idea, I think a video on big Stripe alternative payment processors like LemonSqueezy would be very helpful. Most tutorials use Stripe, but since it isn't available everywhere, LemonSqueezy gained a lot of users and no content on youtube.
Далее
Serverless Auth with Lucia Auth V3
27:46
Просмотров 4,5 тыс.
СПРАВКА ДЛЯ УНИВЕРА
00:44
Просмотров 372 тыс.
Build an App using ChatGPT | No Code required
11:45
Просмотров 1,5 тыс.
10 common mistakes with the Next.js App Router
20:37
Просмотров 188 тыс.
How I structure my next.js applications
23:19
Просмотров 19 тыс.
Next.js with a separate server - good idea?
22:53
Просмотров 51 тыс.
React Proxy | Easiest Fix to CORS Errors
15:52
Просмотров 80 тыс.
Supabase and NextJS 14:  Auth and Server Actions
1:19:31