Skip to content

Infinite loop (follow up) #40

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

Closed
gjm opened this issue Sep 21, 2024 · 1 comment
Closed

Infinite loop (follow up) #40

gjm opened this issue Sep 21, 2024 · 1 comment

Comments

@gjm
Copy link

gjm commented Sep 21, 2024

I think I've made clear what the issue was. No question on a community support forum will solve my problem.

Right now the issue is in Pail (or Laravel itself). The issue occurs because I trigger logging while loading the authenticated user which, in turn, tries loading the authenticated user which triggers logging... and so on.

The call stack is something like this (assuming SessionGuard is used):

  1. call Auth::id()
  2. call SessionGuard::user()
  3. call UserProvider::retrieveById() to get the user from database
  4. UserProvider triggers logging
  5. Pail logging handler calls Auth::id() to get the username
  6. Goto 1

If you answer me that I shouldn't log in UserProvider I'll accept that answer, even though I don't agree with it, but right now I feel there is an issue. Maybe the issue is in Laravel's auth stack itself...

Will gladly provide any additional info if needed.

Thanks again.

Originally posted by @gjm in #39 (comment)

@crynobone
Copy link
Member

You posted the issue based on Laravel Framework 10 which no longer receiving any bug report. On top of that you are creating custom user provider.

Discussing this on support channel is the right move, otherwise you may submit a PR to improve this.

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

2 participants