Embedding in a Web Application
To embed the signing interface in your web app, first get a ceremony URL.
The ceremony URL
Add two query parameters to the ceremony URL:
embedded=true
-> Configures the UI for embedding and specifies allowed sources for theframe-ancestors
directive of the .event_delivery=message
-> Sends ceremony events (like ceremony completion) as Javascript messages.
Example URL with both query parameters:
The <iframe> tag
Embed the signing interface using an iframe tag with the Ceremony URL as the src
attribute.
embedded=true
and event_delivery=message
query parameters appended.Listening to events
The embedded ceremony sends JavaScript MessageEvents for events happening inside the ceremony.
Your app can listen to these events and take actions, such as closing the iframe when the ceremony is completed. Here’s an example of how to listen to these events:
Advanced options
Cancel Button
By default, a cancel button is included inside the embedded app. To handle cancellation yourself, such as placing a close button outside the embedded app, hide the cancel button with the query parameter allow_cancel=false
.
Troubleshooting
If the browser refuses to load the iframe content and you see an error like this in the console log:
Refused to frame … because an ancestor violates the following Content Security Policy directive: “frame-ancestors none”.
Make sure:
- You added the
&embedded=true
query parameter to the ceremony URL. - Your app’s domain is included in the
embeddable_in
array when creating the ceremony.
To troubleshoot problems, you can try adding a wildcard to the embeddable_in
array, for example:
*
wildcard in production, as it can create security vulnerabilities.Was this page helpful?