Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session is clearing when hitting the ACS route #67

Open
ajsheldon93 opened this issue May 16, 2023 · 1 comment
Open

Session is clearing when hitting the ACS route #67

ajsheldon93 opened this issue May 16, 2023 · 1 comment

Comments

@ajsheldon93
Copy link

I have an application using this plugin. Before the user logs in, the app saves a piece of data in a session. I think have them follow a link generated by the saml_route() helper function. The user is redirected to the SSO, they signin, and are directed back to the ACS route. By the time the code get to the acs() method in the src/Http/Controllers/Saml2Controller.php controller, the existing session is cleared and a new one has started.

I traced back through the middleware and the previous session data exists as the request passes through the ResolveTenant middleware and the ones described in the readme.md file:

\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,

I have followed through the stacktrace but cannot figure out what is deleting my existing session and starting a new one.

Any ideas what is causing this?

@ajsheldon93
Copy link
Author

Reading through some other things, if I set the session config 'same_site' => null, it works, but I don't like keeping it like that. Is there a way to fix this without making the session less secure and vulnerable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant