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

[2.x] Jetstream ignoring sessions from session connection in config #630

Merged
merged 3 commits into from
Jan 12, 2021
Merged

[2.x] Jetstream ignoring sessions from session connection in config #630

merged 3 commits into from
Jan 12, 2021

Conversation

sooand
Copy link
Contributor

@sooand sooand commented Jan 12, 2021

When using sessions in a separate database connection, the sessions table is not found when querying or deleting sessions. This pull request takes the session.connection supplied in the config, so the session management for Jetstream can follow the users configs and/or .env values for session connection.

The changes has been made both for Inertia and Livewire stack.

Should be no breaking changes as it uses the same way Laravel/framework gets the session connection in the session manager: https://github.com/laravel/framework/blob/28e0f61bba1cbc727383d183b7116eb723de7660/src/Illuminate/Session/SessionManager.php
line: 99

When using Jetstream with the Livewire stack, It is impossible to use a second database connection specifically for sessions. As the component ignores the session.connection config value.

Could also be fixed by allowing livewire components to be published from vendor folder. If It is possible it's an oversight on my part.
When using another database connection for sessions it is ignored in Jetstream
When retrieving user profile in Jetstream, it ignores a separate database connection for sessions
@driesvints driesvints changed the title Jetstream ignoring sessions from session connection in config [2.x] Jetstream ignoring sessions from session connection in config Jan 12, 2021
@taylorotwell taylorotwell merged commit 8c00820 into laravel:2.x Jan 12, 2021
@thyseus
Copy link

thyseus commented Jan 21, 2021

+1 thanks a lot - i just encountered this issue and was going to make a PR. I am 9 days too late- its your fame :) @sooand

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

Successfully merging this pull request may close these issues.

None yet

3 participants