From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Sign-in button

Sign-in button

All right, so now we're going to get into the sign-in button. Now, before I do anything, I just want to show you that if we were to go to slash API slash auth slash and then anything, so sign-in, it's going to bring us to this button here, which if I click, I can then choose an account. Don't do this. Don't log in. But I just want to show you that basically anything that I put after auth is going to get picked up by next auth. And obviously, this is nothing. So it just says this action with HTTP GET is not supported by NextAuth. All right, so we know that that part of our project's working. Now, we're going to open up the nav bar, because that's where our button is. So let's go to Components, and then Nav Bar. And we're going to bring a few things in from NextAuth. So let's import here. And this is going to be from next-off slash react. And what we want to bring in is going to be sign in, so the sign in function, sign out. We also want use session, and we want get providers. Now, at…

Contents