I currently have a nodejs app which also serves the frontend files (server side rendering). Authentication is done through passportjs using session based authentication. We're currently switching to React as the frontend and having the nodejs application just as an API. However I'm wondering why session based authentication is never used with React. I've been looking up some tutorials and all I see is JWT used as authentication.
Since we already have session based auth setup for the nodejs app, is it necessary to switch to JWT? As far as I know JWT helps in better scaling your backend, however we're going to use a mysql/redis storage for the sessions anyways so I don't really see an issue in here.
I'm looking forward for suggestions/answers, thanks in advance.