function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sfdc Developer07_dev_07Sfdc Developer07_dev_07 

What are the different ways to display lightning component publicly into external website without authorization?

What are the different ways to display lightning component publicly into external website without authorization?

Below approach is correct or not - according to best practices?
  • Site.com site (Included lightning componets into vf page using lightning out)
  • Embedded the salesforce site as iframe into external website.

Thanks in advance.
 
AnudeepAnudeep (Salesforce Developers) 
Hi, 

Lightning out seems to be the best option out there. Adding aura components to any App with Lightning Out is quite different from embedding an app using an iframe. Aura components running via Lightning Out are full citizens on the page. If you choose to, you can enable interaction between your Lightning components app and the page or app you’ve embedded it in. This interaction is handled using Lightning events.

Reference: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_out.htm

Also, this is possible without authentication and you have to use ltng:allowGuestAccess interface

https://developer.salesforce.com/docs/component-library/bundle/ltng:allowGuestAccess

If you find the information I shared useful, please mark this as solved so that it may help others in the community. Thank You

Anudeep