diff --git a/waspc/data/Generator/templates/server/src/routes/auth/login.js b/waspc/data/Generator/templates/server/src/routes/auth/login.js index de2e97c57..7825caf03 100644 --- a/waspc/data/Generator/templates/server/src/routes/auth/login.js +++ b/waspc/data/Generator/templates/server/src/routes/auth/login.js @@ -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() } diff --git a/waspc/examples/todoApp/.gitignore b/waspc/examples/todoApp/.gitignore index 6b0390424..d319a97e8 100644 --- a/waspc/examples/todoApp/.gitignore +++ b/waspc/examples/todoApp/.gitignore @@ -1,2 +1,4 @@ /.wasp/ .env +.env.server +.env.client \ No newline at end of file diff --git a/web/docs/language/features.md b/web/docs/language/features.md index 0a07dfa21..66a228bb8 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -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