CloudServiceKit icon indicating copy to clipboard operation
CloudServiceKit copied to clipboard

Dropbox token_access_type=offline issues

Open daiweilai opened this issue 10 months ago • 0 comments

Hello developer, Thank you for your contributions to the open-source community. Your project is excellent!

I read an official Dropbox blog post:
https://dropbox.tech/developers/using-oauth-2-0-with-offline-access

Key concepts identified:

  • token_access_type: offline vs online

  • response_type: code vs token

  • When token_access_type=offline, only response_type=code is supported

Test results:

  • response_type=code returns a refreshToken

  • response_type=token doesn't return a refreshToken

Current CloudServiceKit implementation:

  • Hardcodes token_access_type=offline → enforces response_type=code

  • Dropbox restriction: When using response_type=code, custom scheme redirect_uri isn't supported (only HTTPS/localhost)

iOS development challenge:

  • Custom URI schemes are critical for iOS callback handling

  • Without custom schemes, callback implementation becomes complex

Alternative approach:

  • Setting token_access_type=online allows:
    ✅ response_type=token
    ✅ Custom redirect_uri
    ❌ No refreshToken returned → Access token cannot be refreshed

Core question:
What's the recommended best practice for integrating Dropbox with CloudServiceKit considering these constraints?

daiweilai avatar Feb 26 '25 08:02 daiweilai