From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
User button and sign-out - Next.js Tutorial
From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch
User button and sign-out
Alright guys, so we're gonna add our user button and sign out, but before I do that. I just want to mention Something about our production site so as you can see every time I push to github it's deploying the site So we have continuous deployment set up and you can see the last one was the last lesson Which was adding that the callback redirect and everything went fine I did have some issues down here that I had to attend to But yeah, so just keep an eye on that as you go now Now, what I wanted to add was in the settings and in the environment variables, we want to add our next auth stuff. So these three lines, I'm going to copy from our .env, and then I'm going to paste them here, except we want to change this. It's not going to be local host. Let's go back to the project and click on that. And this is the domain that I'm using. Obviously, you want to use yours. So I'm going to copy that and then go back to the environment variables and just add that here and here, and then save. All…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Section intro2m 57s
-
(Locked)
Prisma user-related models9m 45s
-
(Locked)
Seed user data7m
-
(Locked)
NextAuth setup17m 31s
-
(Locked)
NextAuth catch all API route4m 12s
-
(Locked)
Sign-in and sign-out server actions8m 27s
-
(Locked)
Auth layout and sign-in page6m 58s
-
(Locked)
Credentials sign-in form6m 39s
-
(Locked)
Hook up sign-in form9m 28s
-
(Locked)
Callback URL redirect4m 26s
-
(Locked)
User button and sign-out11m 48s
-
(Locked)
Signup Zod schema and action8m 15s
-
(Locked)
Sign-up page and form7m 35s
-
(Locked)
Sign-up error handling12m 40s
-
(Locked)
Customize token with JWT callback8m 19s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-