0

Is there a way to require login before a user can see a Lightning Component in Salesforce Community?

  • put that component on community page which is only visible only after login? – Pranay Jaiswal Apr 14 at 17:47
  • After much pain tries, this is the best way to go. – hli1022 May 5 at 2:51
0

Not without code. The "audience" filter in the community builder filters by profile, permission, location, and other criteria. But not login session.

Instead, the component's controller must check for the user id. Then the markup should use an aura:if to show/hide the whole component if they are a guest user or not.

| improve this answer | |

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.