Fix auth redirect to 0.0.0.0 and credentials sign-in error
- Add AUTH_URL env var to docker-compose.yml and .env/.env.example so NextAuth builds correct redirect URLs instead of falling back to the Docker bind address (0.0.0.0:3000) - Normalize email to lowercase in authorize() to match how the register route stores emails, preventing case-sensitive lookup mismatches Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
53e6d363b7
commit
33ed7b7cb7
3 changed files with 5 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
|
|||
password: { label: "Password", type: "password" },
|
||||
},
|
||||
async authorize(credentials) {
|
||||
const email = credentials?.email as string | undefined;
|
||||
const email = (credentials?.email as string | undefined)?.trim().toLowerCase();
|
||||
const password = credentials?.password as string | undefined;
|
||||
|
||||
if (!email || !password) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue