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

Allow for using a custom transport client after handling dauth #405

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

julianlocke
Copy link
Contributor

In some cases, the correct way to customize the behavior of the SDK network stack is to supply your own transport client. There is an API for this through DropboxClientsManager.setupWithAppKey( which SDK users call on app initialization.

This is sufficient for all situations but the session in which dauth is performed. On initialization prior to dauth, there is no user access token or authorized client, so the custom implementation is discarded. The existing dauth url handler API doesn't allow for a custom transport client, and calls setupAuthorizedClient without one, so currently the default transport client is used until the app is restarted.

This change allows for a custom transport client to be included in the handle redirect URL flow. This is the smallest possible change to achieve this, but down the line we should weigh pulling the customization all out into a transport client configuration object instead as the objc SDK does.

Copy link

@jaquish jaquish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julianlocke julianlocke merged commit 5ed2773 into master Mar 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants