In below VF page
<apex:page showHeader="false" sidebar="false" cache="false" standardStylesheets="false">
<apex:includeLightning />
<div id="lightningContainer"/>
<script>
$Lightning.use("c:testApp", function() {
$Lightning.createComponent("c:testLWC",
{},
"lightningContainer",
function(newCmp, status, errorMessage) {
if (status === "SUCCESS") {
console.log("Component Created Successfully");
} else {
console.log("Component not created | " + errorMessage);
}
}
);
},{!endpoint}
,{!sessionId});
</script>
</apex:page>
I am passing the session Id obtained from OAuth, but problem is that the session id is visible by viewing the page source.
Is there any way by which this can be avoided?
EDIT: This app will be hosted on an external website and session will be of an integration user.