Lumen Session not persisting on every request / Lumen SessionManager

Posted 4 months ago by xxRockOnxx

I can't seem to find any way to do sorting of middleware in Lumen. Session auth is being used by the application and the problem is, Authenticate middleware is being called first before StartSession thus resulting in session not behaving properly/not saved.

I know there's SortedMiddleware component but not really sure where to fit that one.

Ideas?

EDIT

Using xdebug to trace the stack, it seems StartSession is called first and then Authenticate next.

After a successful login, Authenticate middleware would fail because it can't get user data from session because it's empty.

Please sign in or create an account to participate in this conversation.