flaviuse / mern-authentication

MERN stack authentication boilerplate: password reset, email verification, server sessions, redux, typescript, hooks and docker for dev and prod.
https://mern-auth-client.herokuapp.com/login
MIT License
439 stars 95 forks source link

savedUser is undefined #17

Closed jacobkossman closed 4 years ago

jacobkossman commented 4 years ago

Had an error when trying to register or do anything with the API. In the auth.js route. Once you switch this to user.email instead it works.

Didn't wanna bother sending a whole pull request for such a tiny thing 👍 Also a quick thing is to switch the sending email as a variable or an environmental variable as I didn't realize i needed to change it.

Thanks for your work, hopefully this will be a great bootstrap for a ecommerce stack I'm building.

flaviuse commented 4 years ago

@jacobkossman Thanks for the catch (the app lacks tests :/) ! I fixed it and added your suggestion with an optional env variable. I'm happy that my work can help you with projects :)