login redirect to custom skuid page

  • 2
  • Question
  • Updated 1 month ago
  • Answered
After a user logs in I'd like to redirect to a skuid page without any salesforce header and sidebar. Is this possible?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yes.  
1. Build your skuid page without header and sidebar.  
2. Then create a VF tab that hosts this page.  
3. Make this VF tab the default tab for the default application the profile sees when they login.  

They will never again see salesforce. 

But you might want to put a back door in your skuid page.  You will also need to replicate SF navigation,  user profile etc.  (Oh..... Now I get what all your recent posts are about..  Let us know how it goes! ) 
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb
How do we do the same thing for a Community user? Using a Visualforce + Tabs template for a community, Salesforce doesn't care what apps are used or what the default tab is. I've added javascript to a skuid page embedded on the home page that redirects after the home page loads, but that's not really ideal. Any other ideas? 
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,328 Points 4k badge 2x thumb
I had an issue doing this Rob's way. For some reason the home tab and the default tab showed up (even though I had both turned off in visualforce and skuid page settings).

The way I got this to work was through LoginFlow.

You create a loginflow and create a visualforce and apex controller.

Source:
https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_...

My visualforce page looked like this:

<apex:page showHeader="false" controller="SkuidLoginFlowController" action="{!FinishLoginFlowStartUrl}">> </apex:page>
(it just calls the "FinishLoginFlowStartUrl" of its controller on pageload)

The apex controller looks like this:

public class SkuidLoginFlowController { 
public PageReference FinishLoginFlowStartUrl(){ 
return Auth.SessionManagement.finishLoginFlow('/apex/home');
}
}
(all it does is redirect to a visualforce page called "home" immediately after login. "home" is a visualforce page which hosts a skuid page)

Here is the "home" visualforce page:

<apex:page showheader="false"
  sidebar="false"
  readonly="true"
  docType="html-5.0"
  title="Salesforce">
    <div class="wrapper">
        <div class="maincontent">
            <skuid:page page="home" />
        </div>
     </div>
</apex:page>
Now all you need to do is create a skuid page called "home" and you're done!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Sweet!