5

Is there any way to expose Lightning .app publicly ? I enabled Lightning components on my dev org and was thinking to do it via force.com sites but I couldn't find a way. Perhaps there is a way to put the Lightning app inside a visualforce page somehow and then in this way I can share the VF page on a Force.com Site?

7

At this time Lightning Apps are only for SF1 Mobile. Edited to add that they're single page apps, so embedding them would not be possible anyway.

  • Thanks for the reply. I guess I have to make it with visualforce than. Any idea if such a functionality is planned to be released in the future? – Munis Quadri Jun 11 '15 at 8:45
  • It's in their long term plan, but I have no idea as to how soon to expect it. Reports and other platform features are already built around lightning technology. Safe Harbor as SF would say. – crmprogdev Jun 11 '15 at 12:34
  • 4
    You can use Lightning Apps from Visualforce pages via the apex:iframe tag. They don't work for Force.com sites as yet, which I believe is due to the permissions of the Guest user profile. – Bob Buzzard Aug 18 '15 at 13:43
  • @BobBuzzard Is it still the case that Lightning Apps/components cannot be used in Force.com sites? – Thomas Taylor Nov 23 '15 at 15:17
  • 2
    @ThomasTaylor, they can be used in Communities, but the W16 release notes said they couldn't be exposed in public facing Sites. – crmprogdev Nov 23 '15 at 15:26
10

@everyone as part of spring 17 Lightning components can be added to unauthenticated sites using lightning out. below is the link

https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_lightning_apps_public.htm

"Add the ltng:allowGuestAccess interface to your Lightning Out dependency app to make it available to users without requiring them to authenticate with Salesforce."

Technical implementation details are mentioned in the above link.

1

Just to add detail to the answer as the question did specifically mention a force.com site.

https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_lightning_apps_public.htm

The org needs to be communities enabled. Based on that, I'm inferring that you can use lighting.out only against a community and not a 'solo' force.com site. It seems force.com sits are being encouraged to sunset IMHO.

  • 1
    I created a POC for that and lightning out also works with no community being enabled. – Jannis Bott Apr 6 '17 at 6:00
  • 1
    Interesting,, Did that work for both unauth and auth'd users? – ChiCloud Apr 7 '17 at 15:08
  • 1
    I just tested this with unauthenticated users.... – Jannis Bott Apr 10 '17 at 5:12
  • 1
    @JannisBott Would you mind sharing your vf page on how you exposed the page on the force.com site. – Swathi Jun 14 '17 at 16:23

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.