dropbox/dropbox-sdk-java

How to use the same DbxPKCEWebAuth via session in PkceAuthorize?

li-exgen opened this issue · 4 comments

Is there any solution to the lack of serialization support for storing DbxPKCEWebAuth as a spring session in redis.

To clarify, are you building a server-side web app? PKCE is meant for client-side apps. If you have a server-side web app you should use DbxWebAuth instead; there's an example of that here.

In order to achieve user provisioning from a SaaS web application to Dropbox, I am performing OAuth authorization on Dropbox's Development App.
The following error occurred.
java.lang.IllegalStateException: For native apps, please use DbxPKCEWebAuth

If your app is a server-side web app, you should use DbxWebAuth, but that error can occur if you don't supply the app secret. Make sure you're supplying both the app key and secret when using that. You would do so using DbxAppInfo, like here in that example.

Provide App key and App secret in DbxWebAuth. Thank you.