Take Full Control of Your Login Process with Visualforce Page Login Flows

Have complete control over the look of your login process and how it behaves. Go beyond customizing the login page with your logo, colors, and right-side content. Use Visualforce to design more elaborate login flows that you couldn’t accomplish before.
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions

You’ve been able to create login flows using the Salesforce point-and-click tool, Cloud Flow Designer. Now you can also create login flows programmatically using Visualforce and Apex controllers and gain more flexibility. With a Visualforce Page login flow, you design the login page from scratch and determine each pixel of the page.

To create a Visualforce Page login flow, the Visualforce developer creates a login flow controller that defines the business process. The Apex controller must contain one of two new finishLoginFlow methods to indicate when the login flow is done and where to redirect the user upon completion.
  • Auth.SessionManagement.finishLoginFlow() redirects users to the default home page.
  • Auth.SessionManagement.finishLoginFlow(startURL) redirects users to a specified page in the community.

A login flow runs in a restricted session. Calling finishLoginFlow removes the session restriction, which gives users access to their community.