A
A
Albert19912021-01-20 18:07:04
Laravel
Albert1991, 2021-01-20 18:07:04

Why are laravel session cookies (laravel_session, XSRF-TOKEN) not being set?

For reasons that are not clear yet, on the same laravel project on different machines, the laravel_session and XSRF-TOKEN cookies are set somewhere, somewhere not (although everything is fine with these cookies on other projects). And it's over, where cookies are not created, authorization does not work.

In this case, session files are created in both cases.

I will be glad to any hint where to dig.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Albert1991, 2021-01-20
@Albert1991

The solution is as follows, in the .env file that was native to the project,
SESSION_SECURE_COOKIE=true was set.
When we tried it on other machines, we did not pay attention that we simply created a new .env, and did not take the old one from the project, and therefore SESSION_SECURE_COOKIE was equal to false (by default )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question