Created
August 16, 2022 16:51
-
-
Save molidev8/1757d48b33502ab6ae91fe35b022c5c9 to your computer and use it in GitHub Desktop.
Setting up the Dropbox connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val config: DbxRequestConfig = DbxRequestConfig.newBuilder("recipe-vault") | |
.withHttpRequestor(OkHttp3Requestor(OkHttp3Requestor.defaultOkHttpClient())) | |
.build() | |
private var client: DbxClientV2? = null | |
/** | |
* Launches the browser for the user to log in to Dropbox and get the credentials | |
*/ | |
fun startOAuth2Authentication() { | |
Auth.startOAuth2PKCE( | |
context, API_KEY, config, | |
listOf("account_info.read", "files.content.write", "files.content.read") | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment