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
When invoking the #simulate action for our admin to assist a customer by simulating their experience, the admin user was signed out, and the customer was signed in, but the admin user is not being persisted in sessions.
# admin_user_controller.rbdefsimulatecustomer=User.findparams[:id]sign_in(:admin,admin_user)unlesscurrent_admin_usersign_out(current_user)bypass_sign_in(customer)# At this point we have a current_user AND current_admin_userredirect_toafter_sign_in_path_for(customer)# Here we lose current_admin_userend
When redirecting from the customer#simulate action to the user#dashboard path, current_admin_user is lost, and the banner is therefore, not shown.
Because it's not shown, the only option is to "logout" entirely, and lose the admin and the customer sessions.
Before upgrading devise from 4.3.0 to 4.4.0, We were able to persist a current_admin_user, and see the above banner on each page the admin navigated to.
Does anyone have ideas, or similar experiences?
The text was updated successfully, but these errors were encountered:
Maybe it's because we started validating the user inside Trackable 🤔
Can you test without the code introduced on #4674?
BTW, we are going to stop running those validations on #4796, so if that's the problem it's going to fixed soon.
that was indeed the problem! I tested my code on commit ce04142 and it was working, then again on the commit from #4674, and it broke. It worked again when I worked with the commit from #4796.
Thanks so much for the help!
Let me know if there's any further documentation that might be useful for this case.
Environment
Current behavior
When invoking the
#simulate
action for our admin to assist a customer by simulating their experience, the admin user was signed out, and the customer was signed in, but the admin user is not being persisted in sessions.When redirecting from the
customer#simulate
action to theuser#dashboard
path,current_admin_user
is lost, and the banner is therefore, not shown.Because it's not shown, the only option is to "logout" entirely, and lose the admin and the customer sessions.
Before upgrading devise from 4.3.0 to 4.4.0, We were able to persist a
current_admin_user
, and see the above banner on each page the admin navigated to.Does anyone have ideas, or similar experiences?
The text was updated successfully, but these errors were encountered: