FAC-Sixteen / Remindly

Birthday App Reminder
https://remindly-app.herokuapp.com/
MIT License
3 stars 3 forks source link

Cookie validation #50

Open sima-qian opened 5 years ago

sima-qian commented 5 years ago

Great work on authentication -- on my local version I've managed to create an account and login as that user. Unfortunately, it took me a while, because I had an old cookie hanging around in my browser that was being mistaken for the token at this line of src/controllers/events.js:

const token = req.headers.cookie.split("=")[1];

It might be good practice to specify the cookie by name.