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.
Credentials sign-in form - Next.js Tutorial
From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch
Credentials sign-in form
So we have our auth layout and sign-in page. Now we need to create the form, which is going to be in a separate component. So everything is really broken up in this project. We want separate components for every form and just all the pieces of the UI. Now, you have a choice here. You could put the form in the components folder if you want. But since it's only part of the sign-in page, I'm actually going to include it in app, parentheses, auth, sign-in and in that I'll create a new file and we're going to call this credentials-signin-form.tsx. And then we'll do SFC credentials sign-in, or yeah, we'll do uppercase I form. And for now, I'll just put whatever form. And we want to bring that into the page that we created in the last video. So here, let's say import and what is it, credentials sign-in form. And we're going to add that right here where I put the comment. So add that. And now we should just see the text form. All right, so we can close the page up for now. Let's go back to…
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)
-
-
-
-
-
-
-
-
-
-
-
-
-