We have a login flow and based on the profile, we redirect the users to a different page inside salesforce. It works fine in the redirection process.
Recently we have installed a managed package, where the users have to authenticate that package against salesforce. The managed package uses OAuth webserver flow. During the authorization, it redirects to the login.salesforce.com page and once entered the password the app will get authorized.
Below Url:
The issue is as soon as those users click the login button, our login flow triggers and it redirects them to our custom page. Hence the app never gets authenticated against the start url apex page.
Any idea, How to solve such errors? Also, I tried with the referrer to get the previous URL before hitting our login flows but it gives Null in the controller.
if
Else to decide whether login flow needs to be invoked or not.
Any thoughts !!!!