Improve documentation around the path location of custom pages #1228
Labels
hacktoberfest-docs
Relates to documentation
upstream
The issue dervies from one of next-auth dependencies
Summary of proposed feature
Improve documentation around using custom pages and their location they must not be put in.
Purpose of proposed feature
The key documentation page for explaining custom signin pages is here.
The documentatin should say that custom pages should NOT be put in the
pages/api/auth
location.Detail about proposed feature
On this page I made the mistake of reading the Examples Email Sign In
pages/auth/credentials-signin.js
and Credentials Sign Inpages/auth/email-signin.js
as instructions to create the pages in the pathpages/api/auth/...
. This error was in part because of the commented out elements ofpages:
in thepages/api/auth/[...nextauth.js]
where it says:I made the incorrect assumption that the custom pages need to be in the
/api/auth/...
path.Potential problems
If the developer puts the pages in the location
pages/api/auth/xxxx...
then for Email and Credentials providers there is an error when trying to go the custom page in that wrong location e.g.You get this error:
API resolved without sending a response for /api/auth/myloginpage?callbackUrl=http://localhost:3000/, this may result in stalled requests.
Additional context
This is the page that should be improved with more guidance.
Please indicate if you are willing and able to help implement the proposed feature.
I'm happy to fork and suggest an edit to the documentation
The text was updated successfully, but these errors were encountered: