I've created a React App to my existing php page which is using session to store userid
. The session is set by a normal .php login page, but when I try to call API call who access the session, it appears it's not set.
Is react apps inside its own 'environment' and is it required to use tokens?
I'm confused..
EDIT: solved it by this question from om a different thread: https://stackoverflow.com/a/44111668/3010171
by including
credentials: 'same-origin'
in the header of the request.