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
    AFAIK that is not possible and one of the remaining advantages VisualForce still has over Lightning Apps. – Adrian Larson Apr 21 '15 at 14:27
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.

  • Do we have CORS released in WInter16 for Lightning application ? I am not able to see it in release notes – Jitendra Zaa Sep 23 '15 at 3:57
  • See my updated answer above – Doug Chasman Sep 23 '15 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.

protected by Community Jan 15 '16 at 16:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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