adrianhajdin / project_next_14_ai_prompt_sharing

Next.js recently became the official React framework as outlined in React docs. In this course, you'll learn the most important Next.js concepts and how they fit into the React ecosystem. Finally, you'll put your skills to the test by building a modern full-stack Next 14 application.
https://www.jsmastery.pro/ultimate-next-course
2.83k stars 416 forks source link

Access Denied - User Schema fix. #73

Closed athskouroliakos closed 10 months ago

athskouroliakos commented 10 months ago

I noticed that I can log in just fine with some emails, but with some others I get access denied. The only difference between the two kinds I can see is that the first kind contains numbers in the email while the other does not (only letters). Can something like this cause an issue? Do I have to declare somewhere that the email can contain numbers? Or is this fact random?

athskouroliakos commented 10 months ago

Well the problem was the 'match' section under username in the UserSchema in user.js. It seems that you have to get rid of the match or redefine the regular expression to accept numbers too.

no_match