function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Snehil KarnSnehil Karn 

Visualforce login flow error - Can't Display Page

I am trying to implement an intermidiary page which will display after login but before landing on the home page. I am using visualforce login flow for that. I tried the example provided in salesforce help page

However when I login with the user, it shows the following error and the user is stuck here itself. I do not understand what wrong I am doing:

User-added image

Here are the code snippets:
VF Page
<apex:page showHeader="false" controller="VFLoginFlowController">
  <h1>You are in VF Login Flow</h1>
  <apex:form >
    <apex:commandButton action="{!FinishLoginFlowHome}" value="Finish and Go to Home"/>
    <apex:commandButton action="{!FinishLoginFlowStartUrl}" value="Finish and Go to StartUrl"/>

public class VFLoginFlowController {

    public PageReference FinishLoginFlowStartUrl() {
        //do stuff
        //finish the login flow and send you to the startUrl (account page in this case)
        return Auth.SessionManagement.finishLoginFlow('/001');

    public PageReference FinishLoginFlowHome() {
        //do stuff
        //finish the login flow and send you the default homepage
        return Auth.SessionManagement.finishLoginFlow();

Raj VakatiRaj Vakati
 To resolve it I used the IDE. Just log into the environment and download 'something' (report, apex, the flow etc) and once it's down, right click on it and hover over the option and click on 'Show in Salesforce Web'. This will bypass the login flow and allow you to move about your instance as per normal and edit/deactive the flow.
Snehil KarnSnehil Karn
Hi Raj,

Thanks for your response. I am not stuck or locked out. I have to implement a login flow using VF page. I am trying to implement that but instead of that page showing, I see the error page as shown in the description. I am looking for a solution for that issue.
Hi Snehil,

Have you fixed this issue?

hi snehil,
 Have you fixed the above issue , please let me know 

Thanks in advance