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
putscurrent_user.id1@mike=User.find(2)sign_in(@mike,store: false)# also tried:sign_in(@mike,event: :authorization,store: false)# result: current_user stays the sameputscurrent_user.id1
Will be even more helpful if you provide a sample application or a test case that reproduces the error.
Expected behavior
putscurrent_user.id2
Also the current_sign_in and last_sign_in timestamps are not changed, so it seems like there is no sign in actually happening with sign_in
Maybe I am not understanding how this is supposed to work? I am trying to sign in a different user when there already is a current_user, e.g. switching the user for impersonating in the frontend app ("An admin user can impersonate a standard user"). The frontend app handles the logic, I just a way to sign_in a different user on an authenticated route, because that route must only be accessible for admins.
The downstream issue for me is that devise-jwt will not dispatch an Authorization header because Devise isn't signing in the user.
The text was updated successfully, but these errors were encountered:
Environment
Current behavior
Will be even more helpful if you provide a sample application or a test case that reproduces the error.
Expected behavior
Also the current_sign_in and last_sign_in timestamps are not changed, so it seems like there is no sign in actually happening with
sign_in
Maybe I am not understanding how this is supposed to work? I am trying to sign in a different user when there already is a current_user, e.g. switching the user for impersonating in the frontend app ("An admin user can impersonate a standard user"). The frontend app handles the logic, I just a way to sign_in a different user on an authenticated route, because that route must only be accessible for admins.
The downstream issue for me is that devise-jwt will not dispatch an Authorization header because Devise isn't signing in the user.
The text was updated successfully, but these errors were encountered: