box / box-windows-sdk-v2

Windows SDK for v2 of the Box API. The SDK is built upon .NET Framework 4.5
https://developer.box.com
Apache License 2.0
186 stars 163 forks source link

About the exist time for authorization code #969

Closed shironeko269 closed 2 months ago

shironeko269 commented 3 months ago

Description of the Issue

WXWorkCapture_17241484502888

I would like to ask is there any way to extend the exist time for authorization code ? Currently, it expired too fast for us.

lukaszsocha2 commented 3 months ago

Hi @shironeko269, there is no way to to extend the time of this short-lived authorization code. What is the authentication flow, which you are using right now? Why would you need it to be extended? Have you considered using another auth method like JWT or CCG? Best, @lukaszsocha2

shironeko269 commented 3 months ago

@lukaszsocha2 Thank you for your prompt reply image

Currently our app wants to support multiple authentication methods. The other methods work fine but for the user authentication method, when it comes to the step of using the authorization code to create an OAuthSession, sometimes the authorization code might expire due to latency or slow network. So I just want to know if there is a way to extend the time of this short-lived authorization code.

lukaszsocha2 commented 3 months ago

Hi @shironeko269, unfortunately this is not currently possible to extend that time. Maybe a retry mechanism could do the job on your side to retry authentication attempts, which failed due to token expiration? Best, @lukaszsocha2

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] commented 2 months ago

This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box .NET SDK and feel free to open another PR/issue at any time.