Fix signing into correct user with credentials
This commit is contained in:
parent
6148f8d1e9
commit
a6c8c8c825
5 changed files with 1 additions and 11 deletions
|
@ -11,7 +11,6 @@
|
|||
.documentContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
.documentContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 400px;
|
||||
overflow: auto;
|
||||
padding: var(--gap);
|
||||
border: 1px solid var(--lighter-gray);
|
||||
|
|
|
@ -119,7 +119,6 @@ const providers = () => {
|
|||
}
|
||||
})
|
||||
|
||||
console.log("New user created")
|
||||
return newUser
|
||||
}
|
||||
}
|
||||
|
@ -160,8 +159,7 @@ export const authOptions: NextAuthOptions = {
|
|||
id: user.id
|
||||
},
|
||||
data: {
|
||||
username: user.name,
|
||||
displayName: user.name
|
||||
username: user.name?.replace(/ /g, "-")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -187,9 +185,6 @@ export const authOptions: NextAuthOptions = {
|
|||
OR: [
|
||||
{
|
||||
username: user?.username
|
||||
},
|
||||
{
|
||||
email: user?.email
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -117,7 +117,6 @@ export async function getPostsByUser(userId: User["id"], withFiles?: boolean) {
|
|||
})
|
||||
}
|
||||
})
|
||||
console.log(posts)
|
||||
|
||||
return posts
|
||||
}
|
||||
|
|
|
@ -27,8 +27,6 @@ export default async function handle(
|
|||
}
|
||||
})
|
||||
|
||||
console.log(tokens)
|
||||
|
||||
return res.json(tokens)
|
||||
}
|
||||
case "POST": {
|
||||
|
|
Loading…
Reference in a new issue