DEV Community

Discussion on: Authentication in NodeJS With Express and Mongo - CodeLab #1

Collapse
 
iprosites profile image
Arion

This article is absolutely fantastic and very timely for me. Everything worked perfectly. I did want to point out one thing in the "/me" function that was confusing but I figured it out. Quick notes in case the screenshot doesn't update:

  • @method - POST should be GET in the "/me" function (minor typo)

  • A screenshot should be provided to show the const auth = require()... being added to the top of the script so we know where that "auth" came from.

  • Instead of saying "Now, ...", which seems like it's about to come up (but doesn't), it would be better to say "As you can see, we added the auth middleware as a parameter in the get function...". I was confused since the const auth was not shown and on first view I missed the "auth" in the get "/me" function since the "Now, " made me think it was coming up. Stupid mistake on my part but I think the combination of these 2 things made for some confusion.

Collapse
 
dipakkr profile image
Deepak Kumar

Hi Arion,

I really appreciate your reply and the time you took to write such great feedback.
I am absolutely overwhelmed. I have done the required changes. .

Thanks a lot and wish you a very happy new year!