Impersonate User and Revert

Posted by Community Admin on 04-Aug-2018 13:38

Impersonate User and Revert

All Replies

Posted by Community Admin on 31-Aug-2016 00:00

I am trying to set up an impersonation feature on our site that allows the admin to revert when they are done.  The impersonation part works fine, but reverting is a problem.  When I try to revert, it fails because the admin is "already logged in."  I don't want to log the admin out until I know that that they can successfully impersonate.  As far as I can tell, this can only be determined when AuthenticateUser is called.  If successful, at that point we are using the impersonated user's account.  If the impersonated user is not an admin, I have not been able to find a way to log out the impersonating admin's account and let them reauthenticate.

Does anyone have an idea how to get around this?

 

I could create another admin account, but that carries its own set of issues

Posted by Community Admin on 31-Aug-2016 00:00

Hi Brian. Not sure if it will helps for you, but you can try to enable self-logout  "Automatically logout backend users from other HTTP clients on login"

http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/programmatically-logging-user-out-of-existing-session

This thread is closed