jimmy | Posts: 32

Session Expired Event Notifier

0 votes
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

Duo_Liang | Posts: 3776

Reply to: Session Expired Event Notifier

0 votes
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 [email protected] for enhancement of this feature. Hope this could help you! Duo

Duo_Liang | Posts: 3776

Reply to: Session Expired Event Notifier

0 votes
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

Attachments
9-20-1.zip1.12 KB

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off