S
S
SKEPTIC2021-03-07 15:37:07
User identification
SKEPTIC, 2021-03-07 15:37:07

How to access cookies when developing with a remote server?

The backend for the site has already been written. This is REST on Laravel.

The frontend is currently being written in Vue. For security reasons, we do not use localstorage to store user identities. Instead, when sending a request to /auth, cookies are set, let's say a "token" cookie with secure+httponly options.
The development of the frontend is carried out on the localhost of the frontender, and the backend already hangs on the test virtual machine and listens to requests.

The whole joke is that the front makes a request to the server and the cookie arrives in the headers, but is not set by the browser) I know that for cross-site requests, the browser does not set cookies for security reasons.

I personally see 2 options.

1) The frontender on localhost runs the already written backend and continues to develop.
2) The frontender commits each change to the server through the same git and testit.

As I understand it, neither is not a convenient action.

Question for experienced developers and those who are in the subject. How to act in such cases? How can you outsmart the browser? Or there are some browsers for developers without such a security system.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question