hoangvvo / nextjs-mongodb-app

A Next.js and MongoDB web application, designed with simplicity for learning and real-world applicability in mind.
https://nextjs-mongodb.now.sh/
MIT License
1.54k stars 289 forks source link

Logging out from the Edit Settings page Error #119

Closed rajbirjohar closed 3 years ago

rajbirjohar commented 3 years ago

Describe the bug When logging out from the edit settings page, regardless of whether or not you made any settings changes, will throw an error saying that it cannot read undefined via emailVerified.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Edit' to reach edit settings of user profile.
  2. Click on 'Logout'
  3. See error

Expected behavior What should happen is that it will send you back to home page without any errors.

Screenshots

Screen Shot 2021-06-01 at 9 39 46 AM

Desktop (please complete the following information):

Additional context I tried setting a const and comparing the emailVerified to false and displaying the email verification message like how the user name is displayed on the user profile page but that forced another error where the user name is undefined.

rajbirjohar commented 3 years ago

On production, your website throws "An unexpected error occurred."

rajbirjohar commented 3 years ago

Oh nvm, i didn't see that this was already an issue #109. I used that solution in the pr and it worked.