Backend Log In Redirect on Log Out

Posted by Community Admin on 03-Aug-2018 23:27

Backend Log In Redirect on Log Out

All Replies

Posted by Community Admin on 10-Jun-2014 00:00

When logging out of the backend as any backend user Sitefinity redirects to the frontend homepage of the site; is it possible to redirect to the backend log in page?

Posted by Community Admin on 12-Jun-2014 00:00

Hi Cody,

Unfortunately this is not configurable.

To change the logout link you would have to go to Administration -> Backend Pages -> (on the sidebar) Manage also Templates and there you should edit the Default Backend Template (the applies for HTML5 Backend Template). There you will see a control titled "Header". This control should be replaced with a custom one that inherits it.

public class CustomHeader : Telerik.Sitefinity.Web.UI.Backend.Header
    protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
    
        base.InitializeControls(container);
 
        var logoutLink = this.Container.GetControl<HyperLink>("logoutButton", true);
        var issuer = SitefinityClaimsAuthenticationModule.Current.GetIssuer();
        var oaReq = new OAuthSignInRequestMessage(new Uri(issuer), SitefinityClaimsAuthenticationModule.Current.GetRealm(), "/Sitefinity", true);
        var backendLoginUrl = oaReq.RequestUrl;
        logoutLink.NavigateUrl = ClaimsManager.GetLogoutUrl(backendLoginUrl);
    


To use it in the backend page you will have to register it in the toolbox


Regards,
Boyko Karadzhov
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 13-Mar-2015 00:00

Another solution is to add a javascript widget to the template with some code like that:

var link = $("a[href='SignOut?redirect_uri=']").first();
     
    if (link != null)
      link.attr('href', 'SignOut?redirect_uri=/sitefinity');
    

This thread is closed