4 ms·
Don't listen to anyone saying "Don't write your own X". These things are not that hard once you filter out all the useless abstractions added by various librari
by porsager 4y ago
Don't listen to anyone saying "Don't write your own X". These things are not that hard once you filter out all the useless abstractions added by various libraries trying to give you a turn key solution. I suppose many just feel safe leaving responsibility in someone else's hands. I have never looked back after fighting passport.js some 10 years ago - being completely free to make you auth flow exactly how you need it is liberating! Now once you've done that a few times you are also in a much better position to decide if it might actually make sense to use a library or some auth provider for any future solutions.
- jacobsimon 4y agoI agree with your point in general, but I think passport.js and its ecosystem of plugins are very helpful. It’s lightweight and customizable for however you want to fetch and serialize sessions, and there are tons of examples online. Do you need it? No, but it makes it easier to standardize your login methods. A non-engineer on our team was able to build “login with linkedin” in less than a day just by following other examples in our codebase which is pretty powerful.
- chasd00 4y agoOne thing about doing your own auth is you end up doing a lot of it. Integrations and expansion means more flows and schemes to do by hand. IMO setting up or buying a stable identity provider with all the bells and whistles is the way to go long term. Then you do your own client if you want but when you need to pull in another app they only need to work with your identity provider and not your code.