Backend Log In Redirect on Log Out
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?
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);
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'
);