5

I have a Lightning app, that I would like to embed in another Salesforce org via Canvas Connected App. It's not a problem with Visualforce pages, but Lightning apps are no option in the "Active Site Home Page" lookup under "Develop" -> "Sites".

It would also be ok to embed the Lightning app into a VF page, maybe someone knows how to do that as an alternative solution?

1
  • 1
    AFAIK that is not possible and one of the remaining advantages VisualForce still has over Lightning Apps.
    – Adrian Larson
    Commented Apr 21, 2015 at 14:27

2 Answers 2

7

Embedding a Lightning .app is totally possible using any iframe based approach including Canvas. This is embedding a single page app though which is a very course grained approach which might be fine if the interaction is also course grained. We're actively working on Lightning Out to allow you to directly embed lightning components cross domain - they run directly in your DOM and automatically take care of cross domain (using CORS) communication, environment initialization, etc. Safe harbor target is Winter '16.

Lightning Out cross domain support is in Developer Preview in Winter '16. Lightning Components for Visualforce is GA in Winter '16.

Both of these features are component centric not app,ovation centric and do not rely on iframes for embedding in your web container.

There is currently an issue (actively being worked on) when you try to leverage LC4VF from a VF page running under Sites/Communities. There is a related issue when attempting to use LO with a guest user that we are also working on.

All of that aside have you tried using an iframe inside of a VF page to include the .app indirectly? I believe you might run into our anti framing/click jacking protection but that depends on the specific domain mix. This is a course grained approach and inferior to LO/LC4VF but might be enough to keep you moving.

2
  • Do we have CORS released in WInter16 for Lightning application ? I am not able to see it in release notes Commented Sep 23, 2015 at 3:57
  • See my updated answer above Commented Sep 23, 2015 at 12:47
2

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.

You must log in to answer this question.

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