in src/pages/api/auth/[...nextauth].ts [26:45]
async authorize(credentials) {
if (!credentials || credentials.username.length < 1) {
// Display an error will be displayed advising the user to check
// their details.
return null;
}
const username = credentials.username;
const user = { id: username, name: username };
if (user) {
return user;
} else {
// Display an error will be displayed advising the user to check
// their details.
return null;
// Or reject this callback with an Error to send the user to the error
// page with the error message as a query parameter
}
}