I am working on a sample application with Spring Boot and Angular 6 I am using spring security with form based login
I am facing below issue while authentication
1)User gets authenticated using form based login and returns JSESSIONID in cookie
2)When the next request is sent by browser , the JSESSIONID cookie is NOT SENT in request causing cookie based authentication failure
After searching a bit , I have found Angular 6.x / Set jsessionid cookie answer which uses HttpInterceptor to send JSESSIONID cookie in request.
But my question is : How to read JSESSIONID cookie at first place ?
Do we need to write any service for this ?
Apart from above approach , we can use {withCredentials = true} approach , but it requires to be added in every request in code which seems not an efficient solution.
Is any other approach available to solve this issue ?
Please help