I am using Custom Change Password page (built on VF) for Force.com site. The same page we are using for 3 different layouts - mobile, web and app view. For the app, I have put a logic that redirects to new change password page that's specific only to the mobile app. After setting the password, I want a user to login directly to the system using site.login(username, password, startURL)
, but startURL is null on this page as we are losing the context of this value.
I was able to generate startURL on Sign In as below-
String startURL = System.currentPageReference().getParameters().get('startURL');
But the same doesn't seem to work on a new Change Password page. Any suggestions to counter this issue?