I am building an app that uses an express backend that will power a next.js and react native front end.
For the web app I would like to use express-session and mysql-express-session, but obviously this won't work for the native app. So what I would like to do is protect the api routes using JWT.
I am abit confused on how to achieve the above. My thoughts are, I would create seperate routes for the react native app, for example I prefix them with /rn, I could then use JWT for these routes and sessions for the web app routes.
Would that be an optimal solution?