Hello! Given: project on Laravel 5.4. It is necessary, when the user is authorized, to check whether he has collected the goods in the cart earlier (before authorization, that is). Items in the cart immediately after the selection by the user are added to the database. If the user was not authorized at the time of the choice, then the session id is indicated in the records. According to this id record you can and "pull."

When the user is authorized, naturally, a new session begins. Now the question. Where can I "catch" the moment when the new session has not yet begun, and the system has already checked the input data? At least which way to look? Or is there simply no such moment in Laravel?

  • The request and response headers can be seen when the data went to check and when the check response came. And this moment between the request and the response by the server will be the time when the user does not yet have a new session, but on the server he is already logged in. According to the idea something like this ... But not sure for all 100% - batya
  • And what prevents to put an old session in the cookie before authorization? and after authorization from there to take and kill? - Orange_shadow

0