+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Impersonate User and Revert

Impersonate User and Revert

2 posts, 0 answered
  1. Brian
    Brian avatar
    26 posts
    Registered:
    12 Jun 2015
    31 Aug
    Link to this post

    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

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    31 Aug in reply to Brian
    Link to this post

    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

2 posts, 0 answered