You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 8, 2020. It is now read-only.
After debugging for quite a while I noticed that Timber does not clear the user set via Timber::Integrations::Rack::UserContext after the user is logged out.
This is due to the fact that the middleware uses Timber::CurrentContext.add that can only change the user context when it is present, but never clears it if the user hash is nil.
As a workaround I am resetting by using a custom user hash:
Timber::Integrations::Rack::UserContext.custom_user_hash=lambdado |env|
Timber::CurrentContext.remove(:user)# My user hash ...end
Proposed fix is to remove the user from current context before this line or wrap with CurrentContext.with around @app.call as done on SessionContext.
As a sidenote, after enabling debug output I noticed a very high number of calls from this middleware even if just a single request was made.