Hi,
I want to upload a blob url from a browser only webapp (no server side) into a dropbox account using the filesUploadSession* api.
First, I need to authenticate with the Dropbox account using the oauth2 api.
I read the related oauth2 guides here
and saw the javascript sdk js examples and specifically the auth example.
The example redirects to the same example page.
In my webapp, the call to upload the file is done somewhere within one of the many js scripts, far after the creation of the main index.html page.
If I redirect to the main page, I don't know how to manage (intercept, and respond) the redirect.
The simplest and naive way for me to get the autherization token is via "implicit grant" that is explained here
But as I understand, it is not recommended to use this grant type and it is not supported by the javascript sdk js
So my questions are:
- How do I handle the "redirect" response?
- Is there a more real-life example that shows how to intercept and respond to the redirect callback?
This is probably more of a basic redirect question. The dropbox auth is just a use case that shows my problem.
Thanks,
Avner