Skip to main content
Solved

Focus View issue with Reloading iFrame


Hello,

I am trying to implement the Focused view for embedded signing in my application. While I can complete the signing process in one shot, there are cases where I would like to reload the iFrame, i.e., call DocuSign.signing again with the same URL and resume my session as it was. Is this possible?

Currently, when I try to reload the iFrame, I see a loading page and a document with the URL chrome-error://chromewebdata/ instead of https://demo.docusign.net/Signing/?insession=1&ti=<id>. I also see the console error :

Refused to frame 'return_url' 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://proof-d.docusign.net https://identity-d.docusign.net https://azure-demo.docusign.com https://content.googleapis.com https://docs.google.com https://players.brightcove.net https://www.youtube.com https://accounts.google.com https://docusign.sjv.io https://apps.usw2.pure.cloud https://docusign.co1.qualtrics.com/ https://sawmill-stage.docusigntest.com https://docusign.okta.com https://demo.forms.docusign.com".

I believe this issue arises because it tries to redirect me to the return URL.

 

Thank you in advance for your response.

Best regards,

5 replies

Badge

Hi IVincent,

 

When you say you are using the same URL which one is that, the API createRecipientVIew or the url that you generated previously with the createRecipientVIew endpoint for the selected user? 

Badge +1

Hello @Sean Boyle,

I am referring to the URL that I generate via the createRecipientView endpoint, which looks like this: https://demo.docusign.net/Signing/MTRedeem/v1/<id>?slt=[...].

Thank you in advance for your response.

Userlevel 2
Badge +7

Hi @lvincent please reference this document:

https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/

The returned URL

The URL returned in this method's response is intended to be used immediately to redirect the signer to the recipient view. You can open the recipient view in the current browser or in a new tab. After the signer is redirected to the recipient view, they must interact with the Docusign system periodically or their session will time out.

The returned URL can be used only once and expires after 5 minutes. Do not store or email the returned URL.

If you want to invite someone to an embedded signing session via email, the email invitation's URL must be to your application. When invoked, your app should request a recipientView URL from Docusign and then redirect the signer to that URL.

 

you should get a new recipient view ulr when you reload. 

 

FreeLink/甫连信息
🌍 DocuSign Partner | Partner Profile
🏆 2024 APAC Reseller Growth Partner of the Year
🔧 First globally to pass DocuSign eSignature Technical Consultant certification
🚀 Expertise in DocuSign integrations with in-house systems for leading enterprises across various industries.

Feel free to reach out for collaboration opportunities.

Badge

I have the exact same issue. I am generating a new URL on every reload. On mount I get the same error mentioned above which implies it immediately tries to redirect the user to the return URL for some reason?

@lvincent  were you able to fix this?

Badge +1

Hello @affanshahidaux ,

I was able to resolve the issue by generating a new URL with each reload. To do this, I create a new RecipientViewRequest as follows :

new RecipientViewRequest([
'authentication_method' => 'None',
'return_url' => 'http://httpbin.org/get',
'recipient_id' => clientId,
'client_user_id' => clientId,
'user_name' => nom,
'email' => email,
'frame_ancestors' => [
currServ,
docusignAppsPath,
],
'message_origins' => [
docusignAppsPath,
],
])

 Then I retrieve the view URL :

viewUrl = envelopApi.createRecipientView(accountId, envelopeId, recipientViewRequest)

Hoping to have been of help,

Best regards,

Lucas

Reply