What is the convention for customizing sign-in pages in NextAuth
Is there any example of custom pages for NextAuth authentication, something that I can follow the similar setup from as with my generated T3 app?
Bear in my mind I did read the NextAuth documentation - but I am still having trouble with figuring out why the setup as they described won't work, and I think it must have something to do with how the server and client structure is setup.
I followed this example:
https://next-auth.js.org/configuration/pages
Pages | NextAuth.js
NextAuth.js automatically creates simple, unbranded authentication pages for handling Sign in, Sign out, Email Verification and displaying error messages.
8 Replies
I built a login.tsx myself and implement the signIn function from Auth
src/pages/auth/signin.tsx
src/server/auth.ts
I heard that this path to the sign in page is a convention
Ahh thank you so much for your answer Ygor, I will try it out again 😄
I had originally followed the documentation - but has some problems with the rendering of the signin page even though it is defined in pages
No problem Mads 😁 , I had some issues when I first tried to implement it myself too, the documentation isn't the clearest.
But I think the problem was in me defining it in the api folder instead of in the pages folder
As I can see you didn't do that:)
if you have any problems with the sign in reach out to me again!
Thanks mate:)
Happy to help!