I’m using NextJS in the frontend, Django API in the backend along with DRF and JWT for authentication and redux for state management.
Almost all of my routes requires authentication.
I’m able to store and access tokens in http-only cookies via NextJS routes API but since I’m using Redux too, all of my requests are going like this;
user request -> redux action -> nextjs route -> backend
Is this normal? I’d to implement nextjs route for each route just to access the http-only cookie and send it to backend endpoint as the route requires an authentication. This is tedious to implement and maintain, I’ve hundreds of routes.
Is there any other way I can achieve this efficiently?