Auth0 Home Blog Docs

Is it possible to specify timeout for SilentAuthenticationHandler in renewAuth method?

timeout
timeout-error
renewauth

#1

It looks like SilentAuthenticationHandler accepts timeout option

function SilentAuthenticationHandler(options) {
  this.authenticationUrl = options.authenticationUrl;
  this.timeout = options.timeout || 60 * 1000;
  this.handler = null;
  this.postMessageDataType = options.postMessageDataType || false;
}

But how can I pass this option when I call renewAuth method?
So it looks like a user was stuck when timeout lasts 60 seconds.


#2

At this time it’s not possible to override the default timeout value used by the handler created as a result of a renewAuth call. As you mentioned the handler itself already supports the notion of a configurable timeout, but the code that creates the handler as part of the renew authentication flow does not allow user code to choose a non-default timeout.

You may consider opening an issue and/or pull request in the library repository, however, have in mind that doing so does not imply that the issue would be addressed and pull requests are reviewed as time permits it and according to other priorities.


#3