I am working with PHP and Laravel at the moment, I have a restful api that the user needs to authenticate with to make sure they can only access things they own etc.
Wha
I suggest to go the following route:
Authorization
header to send the token.While the login system of your website, might be session-based with cookies on client-side, the REST API is token-based and doesn't need a cookie or session.
Please take a look at this for more details: https://softwareengineering.stackexchange.com/a/141434/111803