8

We have a custom branded community set up, this includes branding all 'native' functions such as password reset as well. We accomplished this by enabling Chatter Answers and customizing the Change Password page this way. This works in a regular flow (call Site.ForgotPassword(), user receives email with link, link leads to branded page and user can reset his password)

The problem is that after he has reset his password, clicking the link again redirects to a standard Salesforce login page with a message saying login has failed (but which works to log in to the portal with the new password).

My question is: Can I change this page or fix the failed auto-login issue somehow?

5
  • To clarify, is the desired behavior to have the post-reset link take the user to a "branded log-in page", to a "branded reset password page" where he either can reset it again if he knows his pw or else receives a message that says "failed log-in", "link no longer valid", etc, or do you want to take him to a "branded log-in page" to receive a "failed log-in" message? Its unclear to me what the desired behavior is that you want.
    – crmprogdev
    Commented Jan 28, 2015 at 14:46
  • @crmprogdev Preferably we'd like to redirect to our own login page (which is just a custom VF page)
    – Valyrion
    Commented Jan 28, 2015 at 15:13
  • This would seem to be a matter of adjusting the code for the controller of your reset pw page since that's where the original link would normally take him, but the reset tokens would now be invalid having previously been used. That controller apparently is then redirecting to the normal SF log-in page. If you need further help, you'll probably want to post your code for that controller.
    – crmprogdev
    Commented Jan 28, 2015 at 15:36
  • @crmprogdev But the reset page uses a Chatter Answers component which (I suspect) is doing the redirecting and I don't know how to modify this behaviour
    – Valyrion
    Commented Jan 28, 2015 at 16:13
  • 1
    I no longer have access to the org I did a community in a year and a half or so ago. If I'm not mistaken, there's also a ChangePasswordController that has a public PageReference() with a return that's set in it. Communities and sites also have custom error pages which can be configured. Hopefully someone will jump in who will have a solution for you.
    – crmprogdev
    Commented Jan 28, 2015 at 16:27

2 Answers 2

4

So I logged this as a case with SF support and they have confirmed it as a bug.

I know its hard to believe but we have no control for the Salesforce generated URL for the second.

The URL is available and work for the first time reset , but second it become unknown and expired for the Salesforce, which makes a conflict condition where to land actually with expired automated URL. That is why it redirects us to Community URL/path/login?c=dynamic-session

Unfortunately, this is a badly designed functionality which need to take care by Salesforce communities team

4

I had the same issue and i got the same feedback from the salesforce support team. At the same time i found a workaround to this limitation. If your community is full branded including the login, change password, forgot password, etc. pages you can do the following:

  1. Configure an authentication provider in Salesforce (OpenID type)
  2. Set the Authorize Endpoint URL with your custom login page url (ex. http://XXX/{Community_Name}
  3. Enable this authentication provider to be the only active authentication provider for the specific community

After following the previous steps what will happen is that in case of failure (in the token validation coming from the link sent through the email) salesforce will redirect the user to the authorize endpoint URL which will be your custom branded login page.

I know that all explained is not ideal and not to be considered as a permanent solution but at least you will never render the standard Salesforce login page to the customer.

Hope this help.

I also logged the Salesforce Idea here:

https://success.salesforce.com/ideaView?id=08730000000Dk8hAAC

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .