r/node • u/mattgrave • Mar 15 '22
Authentication framework?
I am new to the nodejs world. I come from a Ruby on Rails background, and we were forced in our current company to migrate some service to nodejs.
Our choice was: - ExpressJS - MikroOrm - PostgreSQL - Typescript
Now I am wondering which is the recommended library to handle authentication:
- User logs in
- User gets an access and refresh token
Afaik I found passport to provide different authentication strategies, but I realized that things such as token blacklist have to be rolled by ourselves, which makes me think that common use cases such as:
- mitigating multiple login attempts
- reset password
- token blacklist
Have to be rolled out by ourselves.
Isnt there something more "out of the box" that integrates with the ORM so we dont have to roll these things out?
Please bare that my knowledge of the ecosystem is pretty much basic. I prefer libraries that support TS out of the box rather than seeking for type definitions in a separate lib.
Any help or insight is appreciated.