-
-
Notifications
You must be signed in to change notification settings - Fork 37
Not load user on initial load from warden in development (config.eager_load = false
)
#210
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
Comments
Thanks for reporting! Looks it's related to this Devise issue: heartcombo/devise#5728 |
I had this patch in initializers file, because without this devise + rails 8 not working :) |
As far as I understand, the following line is not being executed (even with the patch): https://github.com/heartcombo/devise/blob/fec67f98f26fcd9a79072e4581b1bd40d0c7fa1d/lib/devise/rails/routes.rb#L19 Could you please try adding the following (to the same initializer) to verify this hypothesis: # ...
AnyCable.configure_server do
Devise.configure_warden!
end |
Thanks, @palkan . With AnyCable.configure_server do
Devise.configure_warden!
end it start return user on initial app load. So looks like it is devise issue, not anycable |
Hello. Interesting case with with
config.eager_load = false
(development) andwarden
gem.So on first boot after connect to websocket we see this in logs:
which of course not "user", but information, which used to find user in session. But if I change code in project and reload page, will get valid user:
Also issue not present, if
config.eager_load = true
. Maybe it is not issue of a anycable, but rails or warden (or maybe it is known issue), but this is behaviour, which I reproduced. Session storage is cache storage in redis.Versions:
The text was updated successfully, but these errors were encountered: