Hi,
I'm using the C# Quickstart project for embedded signing with the focused view, and I'm running into an issue when using agent recipients.
Goal:
The sessionEnd
event should trigger when the agent completes their part of the signing session.
What's Working:
-
Embedded signing is working for both agent and signer.
-
The
ready
event is triggered properly. -
The
sessionEnd
event does trigger correctly for signer recipients.
Issue:
The issue occurs only for agent recipients. After clicking the Done button on the completion popup, the iframe shows an error message. At this point, the sessionEnd
event is not fired.
This behavior happens consistently when the embedded recipient is an agent. Signer recipients work as expected.
The iframe says:
This content is blocked. Contact the site owner to fix the issue.
And in the browser console:
Refused to frame 'https://localhost:44333/' because it violates the following Content Security Policy directive: "frame-src 'self' https://docucdn-a.akamaihd.net/ https://apps-d.docusign.com https://demo.docusign.net https://account-d.docusign.com https://esign-uat.jpmorgan.com https://esign-uat.chase.com https://esign.jpmorgan.com https://esign.chase.com https://verify-d.docusign.net https://verify.docusign.net https://demo-b.docusign.com".
What I Modified:
I only changed the MakeEnvelope
method in the C# backend to add an Agent recipient with RoutingOrder = "1"
to render their view first, followed by the signer:
Agent agent = new Agent
{
Email = signerEmail,
Name = signerName,
ClientUserId = signerClientId,
RecipientId = "1",
RoutingOrder = "1",
};
Signer signer1 = new Signer
{
RoleName = "signer",
Email = string.Empty,
Name = string.Empty,
ClientUserId = signerClientId,
RecipientId = "2",
RoutingOrder = "2",
Tabs = new Tabs
{
SignHereTabs = new List<SignHere> {
new SignHere {
AnchorString = "/sn1/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "20"
}
}
}
};
envelopeDefinition.Recipients = new Recipients
{
Agents = new List<Agent> { agent },
Signers = new List<Signer> { signer1 },
};
JavaScript integration (focused view) is unchanged:
signing.on('sessionEnd', (event) => {
console.log('sessionend', event);
});
Question:
How can I fix this so that the sessionEnd
event triggers properly for agent recipients in focused view?
Any help or insight would be greatly appreciated!
Thanks!