Skip to content
Discussion options

You must be logged in to vote

After some debugging, I've largely answered my own question:

  1. It appears in one way or another that sessions are only written at the close of a Laravel request lifecycle. Therefore, the order in which \session()->regenerate() is called doesn't matter. (You can test this by copying a Laravel session cookie into an Incognito window, writing to the session in the other window, then calling regenerate. Refreshing the Incognito window doesn't expose any newly-written session details.)
  2. Assuming (1) is correct, then calling \session()->regenerate() multiple times incurs only a small performance penalty on re-randomizing a session ID. Therefore, the fact that \auth()->login() && \session()->regen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shengslogar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant