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?
3 Answers
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? Commented Jun 11, 2015 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. Commented Jun 11, 2015 at 12:34
-
4You 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. Commented Aug 18, 2015 at 13:43
-
@BobBuzzard Is it still the case that Lightning Apps/components cannot be used in Force.com sites? Commented Nov 23, 2015 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. Commented Nov 23, 2015 at 15:26
@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.
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.
-
1I created a POC for that and lightning out also works with no community being enabled. Commented Apr 6, 2017 at 6:00
-
1Interesting,, Did that work for both unauth and auth'd users?– ChiCloudCommented Apr 7, 2017 at 15:08
-
1
-
1@JannisBott Would you mind sharing your vf page on how you exposed the page on the force.com site.– SwathiCommented Jun 14, 2017 at 16:23