I'm using typescript / angular2 in the frontend and nodejs in the backend.
I believe there is actually no problem with the backend itself. I believe the problem is in the frontend.
In an angular2 component I create the following client using '@angular/http'.
this.http
.post(this.url, to_send)
.map((res) => this.handleResponse(res) );
The request for the login is received on the server and I fix a variable to the session via
req.session.cookie.something = "something";
However, when I make another call to the server, in the same or in a different component:
this.http
.post(this.url, ANOTHER_CALL)
.map((res) => this.handleResponse(res) );
The session does not exist in the server side (there is no 'something'. The session is not persistent).
My question is: does this.http from @angular/http automatically handle sessions / cookies in the frontend? What I'm I missing?
I really believe the problem is not in the backend because I've designed similar systems with nodejs before but if anyone thinks it might be because this works with them I'll try and post. However, and again, I really believe the problem must be here.