Build a custom registration page for NextAuth! The credential provider checks credentials against an external source, but there is nothing in NextAuth that helps get the user into the database in the first place.
This guide walks through creating the page and the API route to insert a new user into the database.
It's okay if you have a slightly different technology stack. Just adapt the code and logic to your specific use case.
Follow along, or download the entire project.