0

Is it required to put the signin and signup components inside api/auth path? because I put mine same as other pages file.

|- pages
    |- api (folder)
       |- auth (folder)     
    |- _app.js            
    |- _index.js
    |- login.js  #import Signin component for design
    |- signup.js #import Register component for design      
|- components
    |- credentials (folder)
        |- Signin.js
        |- Register.js

I am confused wheter to follow other file structure or my method is fine.

mjw
  • 11
  • 2
  • The `auth` folder needs to contain the `[...nextauth].ts` file. So your folder structure should be good. Did you encounter some problems with this structure? – lpizzinidev Dec 17 '22 at 07:41
  • So far no errors with my structure. Great thanks! – mjw Dec 21 '22 at 04:37

0 Answers0