6

We have Lightning Community, with only lightning components (no Visualforce).

But when we try to modify default ChangePassword page (one were you enter your new password and password confirmation), we have only two options: Default and VisualForce Page. Why? Why are there no options to use Lightning Page here? Did I miss some steps in configuration?

9
+150

Lightning framework is evolving and Salesforce adds new features in each release.

I see that documentation suggest that you might use Lightning Community Builder to use Lightning Components to modify ChangePassword page.

Also it is suggested here that

The Community Builder is like the Lightning App Builder, except that it’s used to design and build communities using Lightning components. Just like the Lightning App Builder, you can use standard or custom components so administrators can create community pages with point-and-click customization.

============================================================

Ok, I now see your point, despite it is declared in the documentation that this is possible to use Lightning Community Builder for all login pages (Login, ChangePassword, ForgotPassword), it is actually available only for Login and ForgotPassword but not for ChangePassword.

So even if you create a Lightning Community Builder page called ChangePassword it won't appear as an option for ChangePassword override: enter image description here

I believe this is a drawback in design of Lightning Community Builder and it is possible to create an idea for Salesforce to implement this in the new release (for example, in Spring 2018).

Since there are no similar ideas on Ideas Exchange, I created a one there. If you persuade 250 users to vote for that idea then it might get considered to be included and implemented in the Spring 2018 release.

For now in the current Winter 2018 release you can try to use Visualforce with Lightning Theme. As Doug suggested, it is possible to use Lightning Out feature, which allows to have Lightning Components inside of Visualforce

Another option is to use just Lightning Theme without Lightning Component but with native HTML and Javascript, you can refer to Lightning Design System.

For that to work you need to add tag <apex:slds /> to your page and wrap your code in a container: <div class="slds-scope">...</div>

  • The OP referenced the feature you linked to in the question, which shows how to override the Change Password page in Visualforce, not Lightning. I don't think the title you provided for that link really matches the content. – Doug Friedman Oct 31 '17 at 22:00
  • @DougFriedman The documentation is misleading: it is suggesting that user can configure Lightning Community Page for both ForgotPassword and ChangePassword pages, but in fact, you can override ForgotPassword with custom Lightning Community Page, but you can't override ChangePassword with custom Lightning Community Page – Patlatus Nov 1 '17 at 21:11
3

While it is still the case that you cannot directly override the Change Password page with a Lightning Component, you can always embed a Lightning Component within a Visualforce Page. You can call the following Apex from any context to change the user's password:

Site.changePassword(newPassword, verifyNewPassword, oldpassword);

Follow these instructions and you're good to go:

Embed Lightning Component in a VF Page

Site Class in Apex

  • Thanks Doug, that is one way to do it. But i'm looking for "NO VF" solution here. We are using Lightning Theme and that's a main reason i don't want to use Visualforce. – Roman Nov 1 '17 at 13:46
  • 1
    Hey Doug, I'm finding that lightning out is not working on this page... have you had any experience otherwise? I think this is due to the special nature of this page (a custom html page that wraps the vf page that you provide for login). – Caspar Harmer Oct 8 '18 at 21:10
  • Doug or @CasparHarmer, were either of you successful using Lightning component through a vf page to do this? I have not been able to. – Dan Apr 9 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.