I am using passport in 3 or my NodeJS backend. Sometimes it just doesn't work. It becomes so hard to debug it and it gets on my mind. So I am looking for other alternatives. JWT is definitely on my cards but how to go about it. I have no clue. Can somebody help me out here
As per my experience with passport, it is working fine till date. Have not faced any issue. Would love to hear more about the problem that you are facing with passport. What IDE you are using for debugging.
If you are working on small project then I would recommend you going with passport. As you will only have to worry about you business logic over user management.
But yeah, if you are working on big project and you have time to re-implement the login wheel then you should implement everything from scratch. In this case you will have to manage sessions and all that stuff with passport handles.
As you mentioned that you need help with JWT tokens. Check out this link, this guy explains everything you need to know about JWT.
Lars
German developer, who likes to play with everything that comes in his way
Lars
German developer, who likes to play with everything that comes in his way
I prefer writing my own. For me passport was always blocking me.
Simple example. I tried two-factor authentication with passport. Needed like 5 hours and it still didn´t work. Completely removed passport and implemented two-factor by myself, after 30 minutes it was done working.