G Gavins Member Licensed User Longtime User Mar 5, 2025 #1 Hi DonManfred, Sorry to trouble you. I'm having some issues with the authorisation flow using the v7 SDK. Where as previously I could call auth.startOAuth2Authentication and all was right with the world, I'm having issues getting auth.startOAuth2PKCE to work. is auth.startOAuth2PKCE(requestConfig as com.dropbox.core.DbxRequestConfig) correct? There's a note to see Auth#startOAuth2PKCE(Context, String, DbxRequestConfig, DbxHost) in the XML but I can't find this to call? If I call it as it is I get a an error: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics; at com.dropbox.core.android.Auth$Companion.startOAuth2PKCE(Unknown Source:2) at com.dropbox.core.android.Auth.startOAuth2PKCE(Unknown Source:2) etc. Click to expand... Any guidance when you have time would be appreciated. Many thanks Gavin
Hi DonManfred, Sorry to trouble you. I'm having some issues with the authorisation flow using the v7 SDK. Where as previously I could call auth.startOAuth2Authentication and all was right with the world, I'm having issues getting auth.startOAuth2PKCE to work. is auth.startOAuth2PKCE(requestConfig as com.dropbox.core.DbxRequestConfig) correct? There's a note to see Auth#startOAuth2PKCE(Context, String, DbxRequestConfig, DbxHost) in the XML but I can't find this to call? If I call it as it is I get a an error: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics; at com.dropbox.core.android.Auth$Companion.startOAuth2PKCE(Unknown Source:2) at com.dropbox.core.android.Auth.startOAuth2PKCE(Unknown Source:2) etc. Click to expand... Any guidance when you have time would be appreciated. Many thanks Gavin
DonManfred Expert Licensed User Longtime User Mar 5, 2025 #2 Gavins said: Any guidance when you have time would be appreciated. Click to expand... There are two ways of authentification. Both of them works. Thought startOAuth2PKCE is probably the most interestin one. If i remember correctly it works only if the official Dropbox-App is installed on the Device. Using this method you get all the informations needed to do a token-refresh if it expires. Without userinteraction needed. The other one is generating a Auth-URL and open a webbrowser for the user to accept the connection. You´ll get a token back in the webview which you need to copy manually and finalize the authflow in your app then using the copied token. The user need to be involved copying the token, pasting it in your app. This one should work even if there is no Dropboxapp installed on the Device. I´ll post an Example soon showing both Techniques. Upvote 0
Gavins said: Any guidance when you have time would be appreciated. Click to expand... There are two ways of authentification. Both of them works. Thought startOAuth2PKCE is probably the most interestin one. If i remember correctly it works only if the official Dropbox-App is installed on the Device. Using this method you get all the informations needed to do a token-refresh if it expires. Without userinteraction needed. The other one is generating a Auth-URL and open a webbrowser for the user to accept the connection. You´ll get a token back in the webview which you need to copy manually and finalize the authflow in your app then using the copied token. The user need to be involved copying the token, pasting it in your app. This one should work even if there is no Dropboxapp installed on the Device. I´ll post an Example soon showing both Techniques.
G Gavins Member Licensed User Longtime User Mar 5, 2025 #3 Thanks, I'll look forward the example. Seems like it got more complicated with v7. Upvote 0
DonManfred Expert Licensed User Longtime User Mar 5, 2025 #4 Gavins said: Seems like it got more complicated with v7. Click to expand... Once you have startOAuth2PKCE working you´ll not miss it anymore cause of its simplicity. Upvote 0
Gavins said: Seems like it got more complicated with v7. Click to expand... Once you have startOAuth2PKCE working you´ll not miss it anymore cause of its simplicity.
iz2bkt Member Licensed User Longtime User Mar 11, 2025 #5 Hi, DonManfred. I am also waiting for your example. Thank you. Upvote 0