Closed gjm closed 5 hours ago
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.
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):Auth::id()
SessionGuard::user()
UserProvider::retrieveById()
to get the user from databaseUserProvider
triggers loggingAuth::id()
to get the usernameIf 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 https://github.com/laravel/pail/issues/39#issuecomment-2365154390