recipes icon indicating copy to clipboard operation
recipes copied to clipboard

fix(Recipes): auth-jwt-login bug not returning nil if user not found

Open yogenpoonudurai opened this issue 1 year ago • 1 comments

Why?

Instead of returning "User not found", "Invalid password" is displayed when calling getUserByEmail or getUserByUsername and the user is not found in the database.

Related issue: Fixes #2212

What?

This PR updates the database query in the getUserByEmail and getUserByUsername to use First() instead of Find() when looking up a single user record.

Tests:

Screenshot 2024-01-21 at 5 44 57 PM Screenshot 2024-01-21 at 5 45 06 PM

yogenpoonudurai avatar Jan 21 '24 09:01 yogenpoonudurai

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines.

welcome[bot] avatar Jan 21 '24 09:01 welcome[bot]

@yogenpoonudurai thx for the effort and PR, can you check the last hints

ReneWerner87 avatar Feb 21 '24 21:02 ReneWerner87

Ok, will do.

yogenpoonudurai avatar Feb 27 '24 07:02 yogenpoonudurai

Ping @yogenpoonudurai

gaby avatar Mar 24 '24 13:03 gaby

Sorry guys. Missed this. Seems like this has been fixed in #2242. Closing this.

yogenpoonudurai avatar Apr 04 '24 04:04 yogenpoonudurai