Rutwick Gangurde
Rutwick Gangurde

Reputation: 4922

Node JS - Persist session between calls to and fro to the server?

I have a Vue JS UI, which talks to an NodeJS + Express server. The Vue UI is running on port 80 whereas the node server runs on 82. I need the server because we have our custom Oauth server which I need to authn with, and I also need to proxy my API calls via this server. When I first hit the server, it authenticates properly, and the browser is redirected back to the UI by the Authn service. Next time when I hit the server with an API call, it is not able to find the session, hence prompting to auth again. So the issue is that in the to and fro from the UI and back, my session is not persisted.

Is there a way to save the session so and use it in my Axios calls from the server?

Upvotes: 0

Views: 47

Answers (1)

Algo7
Algo7

Reputation: 2166

Can you be more specific about your questionx like show us some code and the current setup.

Have you check out express session and redis-connect?

Upvotes: 1

Related Questions