Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Conversation

ad-mos
Copy link
Contributor

@ad-mos ad-mos commented Nov 7, 2021

Currenly auth instance is setting after swoole reload/restart, so user auth shares across all other requests.

It's rollback for commit 3a93e92 by @Arkanius
Putting Auth instance in pre_resolved array makes it the same instance between different user requests.
Tested on clean Laravel 8 install.

This commit fixes:

  1. Logout user after swoole reload
  2. Share auth instance across all requests

Take a look into documentation:
image

And into code of SwooleTW\Http\Concerns\WithApplication

image

Currenly auth instance is resseting after swoole reload/restart, and after user login - it shares auth across all other requests.

This commit fixes:
1) Logout user after swoole reload
2) Share auth instance across all requests
@Arkanius
Copy link
Contributor

So, when you tested you got the same user at every requests?

@ad-mos
Copy link
Contributor Author

ad-mos commented Nov 12, 2021

Yes, because Auth is pre-resolved instance currently.

@grvoyt
Copy link

grvoyt commented Dec 3, 2021

please accept this pull request. Its resolve problem with auth last user on every requests.

@grvoyt
Copy link

grvoyt commented Dec 3, 2021

@

So, when you tested you got the same user at every requests?

I have the same problem. The first logged-in user for each request is stored in memory

@Arkanius Arkanius merged commit 43d0878 into swooletw:master Jan 20, 2022
@Arkanius
Copy link
Contributor

Sorry for my late response guys. Have being really busy.

Please, if you could, check it out on master to see if your issue is solved.

I'll wait your responses to release the new version

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

Successfully merging this pull request may close these issues.

3 participants