Easily Add Authentication With Nuxt 3 + Supabase

  Рет қаралды 15,835

John Komarnicki

John Komarnicki

Күн бұрын

Пікірлер: 77
@tolgabeyazoglu536
@tolgabeyazoglu536 Жыл бұрын
It is very gratifying that you are making a video about nuxt js 3 when there is such a shortage of resources.
@psybitcoin
@psybitcoin Жыл бұрын
Nice video. Would love to see more of this. Nuxt + Supabase - Features, Best Practices, SSR, SEO, Tests, etc Keep it up!
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
Thanks! I’ve got a course coming out that I’m working on building a saas application using this stack
@monsieurm2904
@monsieurm2904 3 күн бұрын
Bring a legend medal to the guy who made this tutorial
@randel_mcafee86
@randel_mcafee86 Жыл бұрын
Just in time as i have been looking to start a project using nuxt and supabase!
@christopher5731
@christopher5731 9 ай бұрын
Man this video is so well done. Easy to understand, straight to the point. I love it. Keep it up!
@BloodBunn
@BloodBunn 5 ай бұрын
This was so useful, thanks! Please more nuxt and nuxt + supabase content
@adydetra_
@adydetra_ Жыл бұрын
bro can you send this source code/repo and put link in description?
@elementxyz
@elementxyz 6 ай бұрын
Thank you for this wonderful video! Here and there you have to tweak some things, but this helps me a lot!
@JohnKomarnicki
@JohnKomarnicki 6 ай бұрын
Thank you! Shortly after this video they updated the auth setup. I need to get around to creating an updated version
@StellaCrewGaming
@StellaCrewGaming 7 ай бұрын
Thank you so much, was able to figure out my issue thanks to this video!!
@larsnobel4279
@larsnobel4279 4 ай бұрын
Not showing how template is build and no github repo?
@welkerarantes9073
@welkerarantes9073 2 ай бұрын
Awesome video !!! 🤯 It helped me so much
@antoniogiroz
@antoniogiroz Жыл бұрын
Can you create an additional video showing how to create a profile table to store the user info once is registered?
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
Yeah, I might do a follow up to a few things in regards to this video and that was one of them
@DanteMishima
@DanteMishima 9 сағат бұрын
Would have liked to see the sign up login markup
@ManasMadrecha
@ManasMadrecha Жыл бұрын
Very very helpful video on authentication. Just one doubt: if I want to add permission system (authorisation), i.e., users with only specific permissions can view certain elements of a page, what should be the best approach? Create a Users table postgres database in supabase and add different columns for each permission type? Can we reuse the Users table inside the supabase auth page, instead of creating new one in database page?
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
For different user levels you can use what are called custom claims. This is what I’m doing within my application. These values get stored on the raw_app_meta_data field of the users table in the auth schema. I might do a follow up video on this
@RootsterAnon
@RootsterAnon Жыл бұрын
@@JohnKomarnicki please do. also can you show how to login user after he clicked on email link?
@xeon7879
@xeon7879 Жыл бұрын
Thx for the video! Just a quick question: Would i need to use definePageMeta on every page or is it possible to define it on a layout for example and make it available to all pages? What would be the best solution for this?
@peoray
@peoray 4 ай бұрын
how did you verify the user email? cause you can't login without confirming email but not shown in the video
@masu4644
@masu4644 7 ай бұрын
no codebase ? -_-
@bombrman1994
@bombrman1994 11 ай бұрын
i need the repo so bad, i am stuck
@sonny5497
@sonny5497 5 ай бұрын
thanks this was very helpful 💯
@martinpenev6750
@martinpenev6750 Жыл бұрын
How does Supabase identify the user? Session ID in local storage? JWT?
@JuanBayonaBeriso
@JuanBayonaBeriso Жыл бұрын
Does this work in server routes?
@psybitcoin
@psybitcoin Жыл бұрын
Interesting question
@AyyLebo
@AyyLebo Жыл бұрын
Great video, thanks !!
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
Glad it was helpful!
@JenniferBland
@JenniferBland Жыл бұрын
Is there a GitHub repo for this demo?
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
There is not. However, this page on the supabase docs should be helpful. supabase.com/docs/guides/getting-started/tutorials/with-nuxt-3
@osherezra131
@osherezra131 Жыл бұрын
TNX
@hugomejia7826
@hugomejia7826 11 күн бұрын
Thanks for the video, really helped. However, does anyone knows how to handle the email confirmation callback? I'm having trouble to manage, what to do with the "code" param that's returned by Supabase to my Nuxt app. As I'm using client side register, I'm not getting a has_token but don't know wha to do with the "code", shall I store it ? Ignore it ? Any help highly appreciated 👍
@eltonlrodriguez
@eltonlrodriguez Жыл бұрын
So I reproduced what I got here and I find myself in an interesting dilemma. I am stuck in the login page, and cannot seem to go to register despite my best attempts. The login does not work, despite having manually placing my credentials within supabase in order to test the login, console returns I'm not logged in either. When I check my supabase client to see if the connection string is correct (URL and anon string), it is all correct. Does anyone experience the same issues as myself? Or am I doing something wrong?
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
After this video was released supabase updated the auth. If your using nuxt, even if you have your own custom middleware it will still redirect you. You will need to add to the nuxt config a redirect:false property to the supabase config
@eltonlrodriguez
@eltonlrodriguez Жыл бұрын
@@JohnKomarnicki That did it! Thank you for reaching out and letting me know. It had been bothering me for days trying to understand what I was doing wrong.
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
Of course, glad to hear that it helped! If you do wanna learn more about that update specifically you can check out the nuxt supabase docs: supabase.nuxtjs.org/get-started#redirect
@eltonlrodriguez
@eltonlrodriguez Жыл бұрын
@@JohnKomarnicki I will check it out, thank you!
@jdhurrell
@jdhurrell Жыл бұрын
@@JohnKomarnicki Thanks for that. I also experienced that same issue recently and it was driving me mad. I opened a project that had been working fine a few weeks ago that suddenly would not allow anonymous access to existing pages. Thanks for the videos.
@YoheiKung
@YoheiKung Жыл бұрын
why when i add "const client = useSupabaseAuthClient();" i keep get 500 document is not defined
@adydetra_
@adydetra_ Жыл бұрын
same
@RonGeorgePile
@RonGeorgePile Жыл бұрын
they dropped useSupabaseAuthClient(). Alternatively, use useSupabaseClient()
@Cwoissant
@Cwoissant Жыл бұрын
I guess it changed recently, replace useSupabaseAuthClient(); by useSupabaseClient(); and it should work
@businessoftechnology
@businessoftechnology Жыл бұрын
@@Cwoissant now it appears to be `createClient()`, lol.
@BloodBunn
@BloodBunn 5 ай бұрын
auth.js from middleware (prevent access to profile page if !user.value) export default defineNuxtRouteMiddleware(() => { const user = useSupabaseUser() if (!user.value) { return navigateTo('/login') } }) auth2.js from middleware (redirect the login page to profile page if logged in) export default defineNuxtRouteMiddleware(() => { const user = useSupabaseUser() if (user.value) { return navigateTo('/profile') } })
@LOKESHSRINIVAS-x1z
@LOKESHSRINIVAS-x1z 8 ай бұрын
when i created a register page and add supabase it automatically redirect to the login page. any solution?
@JohnKomarnicki
@JohnKomarnicki 8 ай бұрын
There’s a new option you need to define in the supabase config that went love not to long after this video was released. Check out the nuxt supabase docs, it’s highlighted there
@MrSonicastra
@MrSonicastra Жыл бұрын
Hmm for some reason i can't go to /register it redirect me to /login whole the time?
@fedvvvv
@fedvvvv 4 ай бұрын
Same for me. This is the default behaviour for the supabase nuxt module. For some reason the devs thought this would be a smart idea. The only way I was able to get the register page to work is by adding this to my nuxt config: supabase: { redirectOptions: { exclude: ["/register"], }, }, With this, you will have to create your own nuxt middleware to handle route guarding.
@bombrman1994
@bombrman1994 11 ай бұрын
the default middleware is holding me on login and i cant figure the documentations how to let the user allowed in register page
@intervelix7822
@intervelix7822 11 ай бұрын
did you try in your nuxt config: supabase: { redirect: false, },
@JohnKomarnicki
@JohnKomarnicki 11 ай бұрын
Yea. Since posting this video they changed this. The above solution should fix your issue!
@husseinalhilfi8186
@husseinalhilfi8186 4 ай бұрын
It is not secure.
@fedvvvv
@fedvvvv 4 ай бұрын
Ok. Why? Very useful comment, dude.
@iml404
@iml404 2 ай бұрын
9 from 10 nuxt developerts don't use supabase, you tutorial sucks
@JohnKomarnicki
@JohnKomarnicki 2 ай бұрын
Thanks!
@pr0viz796
@pr0viz796 7 ай бұрын
when i click to register the email and password i'm getting the error: Email rate limit exceeded 429 (Too Many Requests) const { data, error } = await client.auth.signUp({ email: email.value, password: password.value, }); what i'm doing wrong?
@atharvasurwase6772
@atharvasurwase6772 7 ай бұрын
edit suffering the same error
@BloodBunn
@BloodBunn 5 ай бұрын
same problem, did you find a solution?
@pr0viz796
@pr0viz796 5 ай бұрын
@@BloodBunn sadly i did not
@BloodBunn
@BloodBunn 5 ай бұрын
@@pr0viz796 what backend do you use then? Or what auth service?
@pr0viz796
@pr0viz796 5 ай бұрын
@@BloodBunn i didn't finish the project at all as it was a side project
@Artison14
@Artison14 Жыл бұрын
Thanks a lot for the help man, you saved my ass
@JohnKomarnicki
@JohnKomarnicki Жыл бұрын
Glad to hear! 😀
Data Fetching With Nuxt 3
20:31
John Komarnicki
Рет қаралды 36 М.
Improving Security of Nuxt 3
13:12
Jacob Andrewsky
Рет қаралды 7 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 50 МЛН
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 41 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
Auth in Nuxt 3 the EASY WAY
6:22
LearnVue
Рет қаралды 50 М.
Creating APIs in Nuxt with Daniel Roe
33:33
Treblle
Рет қаралды 13 М.
Oh, Auth Doesn't Have to Suck?
7:16
Josh tried coding
Рет қаралды 66 М.
Nuxt in 100 Seconds
2:50
Fireship
Рет қаралды 581 М.
Supabase and Vue 3 Setup with Basic Authentication
34:54
Nunya Klah
Рет қаралды 951
Nuxt 3, Tailwind, and Supabase Crash Course
23:01
Jacob Andrewsky
Рет қаралды 7 М.
Supabase Crash Course
25:17
Traversy Media
Рет қаралды 133 М.
Supabase in 100 Seconds
2:37
Fireship
Рет қаралды 525 М.