I am running frontend and backend on different ports: backend localhost:8000 and frontend localhost:3001
I am using express-session middleware, I need to save access token there. So, I am doing authorization first, which gives me code, this code is only for one time use and then it is exchanged with access token. If I just send response data to backend port, all is working fine, after refreshing website, data is still there, access token is saved in session and all good, but when I try to fetch data from frontend, from different port, session is not saved there.
So, question is how can I send this session to frontend side?
I hope, I explain it well.
I have tried different ways but nothing worked out.