mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-23 19:29:17 +03:00
Fixes login issue for uppercase usernames (#751)
This commit is contained in:
parent
6d0affac49
commit
a84f3547fa
@ -12,7 +12,7 @@ export default handleRejection(async (req, res) => {
|
||||
const context = {}
|
||||
|
||||
// Try to fetch user with the given username.
|
||||
const user = await prisma.{= userEntityLower =}.findUnique({ where: { username: args.username.toLowerCase() } })
|
||||
const user = await prisma.{= userEntityLower =}.findUnique({ where: { username: args.username } })
|
||||
if (!user) {
|
||||
return res.status(401).send()
|
||||
}
|
||||
|
2
waspc/examples/todoApp/.gitignore
vendored
2
waspc/examples/todoApp/.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
/.wasp/
|
||||
.env
|
||||
.env.server
|
||||
.env.client
|
@ -827,7 +827,7 @@ Default value is "/".
|
||||
### Username and Password
|
||||
|
||||
`usernameAndPassword` authentication method makes it possible to signup/login into the app by using a username and password.
|
||||
This method requires that `userEntity` specified in `auth` contains `username: string` and `password: string` fields.
|
||||
This method requires that `userEntity` specified in `auth` contains `username: string` and `password: string` fields. `username`s are stored in a case-sensitive manner.
|
||||
|
||||
We provide basic validations out of the box, which you can customize as shown below. Default validations are:
|
||||
- `username`: non-empty
|
||||
|
Loading…
Reference in New Issue
Block a user