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.
Sign-up page and form - Next.js Tutorial
From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch
Sign-up page and form
So now we want to create our sign-up page and form. And they're going to be very similar to the sign-in. So we can just copy and just change some stuff up from those. So for the page, let's go into App, Auth. And then we're going to create a folder in Auth called sign-up. And then we can copy the page.tsx from sign-in and paste it into sign-up. And then just change up a few things. So for one, we're going to change sign-in page here and here to sign-up page. And then let's get rid of the credential sign-in form. We don't need that. We're going to have a different form. And then let's see. All this stuff, I'm pretty sure we're going to use this. For the title, let's say sign-up. And then we're still going to use the callback and stuff Because again, not only are we signing up, but it also signs the user in. So this callback stuff, we can keep that. And then down in the return, we're going to have the logo. Let's change this to sign in. We'll say create account or sign up, whatever you…
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)
-
-
-
-
-
-
-
-
-
-
-
-
-