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

Forums / General Discussions / Backend Log In Redirect on Log Out

Backend Log In Redirect on Log Out

3 posts, 0 answered
  1. Cody
    Cody avatar
    4 posts
    Registered:
    17 Mar 2014
    10 Jun 2014
    Link to this post

    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?

  2. Boyko Karadzhov
    Boyko Karadzhov avatar
    56 posts
    Registered:
    14 Jul 2016
    12 Jun 2014
    Link to this post
    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
     
  3. LUDWIG
    LUDWIG avatar
    7 posts
    Registered:
    06 Jul 2012
    13 Mar 2015
    Link to this post

    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');
        }

3 posts, 0 answered