Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to configure callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis in OkHttpClient used by DefaultClient #787

Open
5 tasks done
Dmitry-Komarovsky opened this issue Dec 12, 2024 · 1 comment
Labels
feature request A feature has been asked for or suggested by the community

Comments

@Dmitry-Komarovsky
Copy link

Dmitry-Komarovsky commented Dec 12, 2024

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

When using CredentialsManager.getCredentials() method there is no direct way to set a custom value for callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis in OkHttpClient used by DefaultClient class. DefaultClient class doesn't set any value to callTimeoutMillis therefore it is 0 by default which means unlimited timeout and this leads to the need to limit this timeout on the client side, for example limit the execution time of CredentialsManager.getCredentials() with external means such as CountDownLatch and wrap this code in a try-catch block.

Describe the ideal solution

Add new parameters to the constructor of Auth0 class to set custom values of callTimeoutMillis, readTimeoutMillis and writeTimeoutMillis.

Alternatives and current workarounds

Limit the execution time of CredentialsManager.getCredentials() with external means such as CountDownLatch and wrap this code in a try-catch block.

Additional context

No response

@Dmitry-Komarovsky Dmitry-Komarovsky added the feature request A feature has been asked for or suggested by the community label Dec 12, 2024
@pmathew92
Copy link
Contributor

Hi @Dmitry-Komarovsky , Thank you for bringing this up. Will discuss this with the team to take this in the coming releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

2 participants