I'm using a force.com site and it has a login method that allows you to redirect them to different landing pages from within apex via Site.login(username,password,url)
. However it appears there is no Site.logout() method. Its my understanding that logout is configured via the customer portal settings and then called using {!$Site.Prefix}/secur/logout.jsp
.
My issue is what if I want to redirect the user to different logout pages conditionally? Is there any way to do this or am I stuck using only the URL in the customer gateway settting.
Thanks!
Best Answer
You are correct, there is no Site.logout() method, sadly. Directing to the /secur/logout.jsp page is the only Salesforce-blessed method I know of for doing logout, and doesn't support any conditional logic, AFAIK.
A few semi-hackish options, in the order of how likely they are to meet your requirement.