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
KarimiKarimi 

Login flow fault blocks access to Salesforce

Trigger failure causes login flow exception. Problem is that I have only one admin user in this development sandbox. Other user has standard user profile and it can be logged in. This other user doesnt have capabilities to deactivate login flow or deactivate trigger causing this error.

I have tried to reset password and it failed too because login flow was activated even in password change.  Is there way to get access back without dumping sandbox and rebuild it from a scratch? Force IDE is not a option because security token is not valid. All help I can get is much appreciated, thanks!
Best Answer chosen by Karimi
JoelRichardsJoelRichards
I had a similar problem that I resolved by using the Force.com 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 force.com 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.

All Answers

NagaNaga (Salesforce Developers) 
Hi Karimi,

When a user’s profile is associated with a login flow, the user is directed to the flow as part of the authentication process. The login flow screens are embedded in the standard Salesforce login page.
During the authentication process, these users have restricted access to the login flow screens. At the end of a successful authentication and completion of the login flow, the user is redirected to the organization. Otherwise, an explicit action can be defined within the flow to deny access.

For example, an administrator can create a login flow that implements a custom two-factor authentication process to add a desired security layer.
A flow like this uses Apex methods to get the session context, extract the user’s IP address, and verify if the request is coming from a Trusted IP Range. (To find or set the Trusted IP Range, from Setup, choose Security Controls | Network Access.) If the request is coming from within a Trusted IP Range address, Salesforce skips the flow and logs the user into the organization. Otherwise, Salesforce invokes the flow providing one of three options.Direct the user to log in with additional credentials, such as a time-based one-time password (TOTP).
Force the user to log out.
Direct the user to a page with more options.

Best Regards
Naga Kiran
KarimiKarimi
So is there a way to skip this flow or change password? Then I would get security token to my email and fix this error using Force IDE
JoelRichardsJoelRichards
I had a similar problem that I resolved by using the Force.com 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 force.com 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.
This was selected as the best answer
KarimiKarimi
Thanks for your reply JoelRichards.  I will remember that if something like this happens again.  
Lynette Holtzhausen 10Lynette Holtzhausen 10
Hi everyone,   I'm experiencing a similar issue.  But I cannot log in to deactivate the flow, as this flow is setup to come up upon login.
It's telling me to log out everytime.   Is there a way to bypass this?User-added image
Priyank Dimri 3Priyank Dimri 3
Hi, 

I too can not log into my Dev org IDE since i dont remeber the passowrd (also dont the security token) and the login flow would not allow to reset the password or acees the org. Could you please help? 

Many Thanks !

User-added image
KarimiKarimi
Hi,

if you dont have the security token you could try to download something from your org with tools that uses oAuth for authentication so there is no need for token. Atom with Mavensmate for example is good tool for that, it does not require security token. That I dont know is login flow skipped with oAuth authentication I havent tested authentication in org that has login flow active. If successful then you could try to get in to your org using "Mavensmate->Open Salesforce Org"  menu item. It logins to org via SOAP API I think
Sagar Raut 8Sagar Raut 8
Hello Karimi ,
did you solve the problem ? I am facing same issue from last 2 days .while trying to login in from force.com IDE it says  incorrect username,password or user  is locked . 
Ashutosh Kumar 148Ashutosh Kumar 148
Hi All,

  Is this issue is resolved? i am facing same issue and my developer org password is also expired so not able to login in force.com IDE.

Is there way to log a salesforce ticket for developer org to resolve this login flow issue?

 
backenedbackened
I am also facing this issue , can anyone help me in this
backenedbackened
I am unable to login in my account , facing this issue
Rangaswamy ChinnaswamyRangaswamy Chinnaswamy
Called saleforce support in the phone no - 8006676389 
Select option - 2 (Standad support)
Select option - 1 (Severity one support)
Then the support agent picked up the call and created a case for me and assigned to development team(Level 2 ) and they had removed the flow from the login flow setup. It look 2 days to get it resolved.  Thank you salesforce support.
roni shoreroni shore
you may raise a case with SF and get the login flow deleted. I was stuck with the same issue and got it resolved by SF support.
raise a case for dev account: https://trailhead.salesforce.com/help?support=mycases