This topic contains 2 replies, has 2 voices, and was last updated by  Duo_Liang 6 months ago.

  • Author
    Posts
  • Participant
    jimmy
    Member
    Member since: 02.11.2015
    Number of posts: 27

    Hi is there an event notification(https://docs.esignlive.com/content/c_integrator_s_guide/event_notifier/event_notifier.htm) for when the signer’s session expires in an iFrame? If not do you know of a way for the parent to tell that the session has expired?

    Thanks, Jimmy

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 688

    Score

    0

    Hi Jimmy,

    Currently, there’s no direct notifier for “signer session expired” event. From my test, I noticed there will be a “feedback container is no longer supported” warning but I won’t consider it as a trigger.
    So for temporary, you can build this capability at your own side. After you receive the last notifier from iFrame, the signer session will be expired after a fixed timeout (by default it’s a 30 mins and you can set this timeout by contacting our support). So you can use a count down clock in your front end listening to this event.
    At the same time, you can fill in an ER form by contacting sign.support@onespan.com for enhancement of this feature.

    Hope this could help you!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 688

    Score

    0

    Hi Jimmy,

    Alternatively, there’s a workaround for you:
    #1, modify your “signer redirect url” attribute, link it to a source within your domain (in the example, i used child.html). To change your redirect url, you’d contact our support team.
    #2, in this internal source, you directly call an IIFE JS function, to post message to your parent window by

    (function(){
    		window.parent.postMessage('ESL:MESSAGE:ERROR:SESSION_EXPIRE', "*");
    })();

    #3, in your parent page, you can receive and handle this message like what you did to other notifiers send from OneSpan Sign (in the example, I refreshed the iFrame page):

    function receiveMessage(event) {
    			var origin = event.origin || event.originalEvent.origin;
    			var data = event.data;
    			console.log(data, origin);
    
    			switch (data) {
    				case 'ESL:MESSAGE:ERROR:SESSION_EXPIRE':
    					document.getElementById("myIframe").src += "";
    					break;
    				default:
    					event.source.postMessage(data, origin)
    					break;
    			}
    		}

    The attachment is the full complete code.

    Hope this could help you!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 6 months ago by  Duo_Liang.
    Attachments:
    You must be logged in to view attached files.

You must be logged in to reply to this topic.