fake-api-jwt-json-server icon indicating copy to clipboard operation
fake-api-jwt-json-server copied to clipboard

hi I found why I get wrong email or password error

Open AhmadShallal opened this issue 5 years ago • 2 comments

hi amazing project , helped me a lot and works easily I got response 401 wrong email or password it was because syntax mistake at line 30 of server.js

// Check if the user exists in database function isAuthenticated({ email, password }) { ------>>>> // return userdb.users.findIndex(user => user.email === email && user.password === password) !== -1 <<<<------- return userdb.users.findIndex(user => (user.email === email && user.password === password) !== -1) }

just brackets

AhmadShallal avatar Oct 02 '19 17:10 AhmadShallal

Yes, work now for new users.

Marzeu avatar Oct 02 '20 20:10 Marzeu

Thank you AhmadShallal, it helped save a lot of time for the beginners. I hope the git owner will make the updates

kantha88 avatar Apr 16 '21 09:04 kantha88