Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

nest.js is fantastic. https://nestjs.com/


Agreed - trying out nest.js the first time gave me hope that we'd see something like Django for typescript/javascript. Especially paired with nx workspaces, with shared code between front & backend... so nice.


How's their authentication solution? Auth is such a critical component of most web apps, yet something that IMO a lot of web frameworks don't fully flesh out compared to how easy it is with Django.

I took a quick look at their auth docs, and while the docs seem pretty detailed, I noticed it involves multiple packages (@nestjs/passport, passport, passport-local, and their corresponding types) that you then have to glue together into a full solution. The instructions also apparently only show you how to store passwords in plain text, and using something like bcrypt to do it yourself is an exercise left to the reader. Not rocket science, as this [1] (older) article pointed out, it's hard finding quality auth-related tutorials in the Node ecosystem. With Django a lot of this stuff is built-in and solidly implemented. Granted, this was after a quick look at the docs, so my impression might be off.

[0] https://docs.nestjs.com/security/authentication

[1] https://hackernoon.com/your-node-js-authentication-tutorial-...


Passportjs is the standard across all these frameworks. It's modular by design, so you can easily compose the right auth system for your needs. I've always found it quite intuitive and I've never seen anything even nearly as comprehensive in any language.

http://www.passportjs.org/


What do you find you get from auth libraries? I've always found them much more trouble than they're worth. But I feel like I must be missing something.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: