Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

_camilo_'s avatar

[API] When I request to my API, my user gets unauthenticated.

Hi there! Here are the details:

I have two Laravel applications running: - The Website, who consumes; - The CMS, which delivers data via API.

The weird thing is, when I make a request from the Website to any of the CMS endpoints, everything works perfectly but the user of the CMS gets logged out.

When I access the API route inserting it directly in the URL or Postman, the problem does not occur, so there's something happening in the "cross-enviroment" communication.

The requests are being made with PHP native cURL.

Tell me which snippets of code I should provide so you can help me!

Thank you.

0 likes
0 replies

Please or to participate in this conversation.