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

Ability to upload maps to dropbox #263

Closed
macrigiuseppe opened this issue Oct 22, 2018 · 3 comments
Closed

Ability to upload maps to dropbox #263

macrigiuseppe opened this issue Oct 22, 2018 · 3 comments
Assignees
Labels
feature A new feature frequent ask rfc roadmap item Item that's on our current roadmap

Comments

@macrigiuseppe
Copy link
Collaborator

macrigiuseppe commented Oct 22, 2018

Is your feature request related to a problem? Please describe.
Users will be able to export the Kepler.gl file onto their Dropbox user account.

Describe the solution you'd like
When users export their configuration and data, they will have the ability to choose Dropbox as destination. Users must authenticate against Dropbox before they could perform the saving action.

Auth Flow
It is important to remember that Kepler.gl doesn't require a back end server to run on therefore all

  • User click on export map in the current Tab (aka parent tab)
  • User will click on auth button which will redirect the user to dropbox by opening a new tab/window (aka child tab)
  • The parent tab will subscribe to local storage events (required for other steps)
  • After a successful login, dropbox will redirect the user to kepler.gl/#/auth which will read the auth token provided by dropbox and store in the local storage always remaining the child tab.
  • The child tab will automatically close after storing the token.
  • The parent tab will receive the storage event and will read the auth token from local storage which will be used to upload and store the file in Dropbox.

The above flow will allow users to work on their map and perform the Dropbox auth without losing their current work. If we were to log users on the same tab where they are performing their mapping they would lose their work completely because the app would reload completely after the auth process

Constraints
It looks like OAuth 2 protocol does not accept callback URIs with fragments, e.g. /#/demo. This could be an issue for our demo instance since we are running on github pages and the hash sign is required.
I will look for a possible solution.

Describe alternatives you've considered

  • Google Drive: not available everywhere
  • Box: their APIs are not as easy as Dropbox ones

Additional context
New UI is required

@macrigiuseppe macrigiuseppe self-assigned this Oct 22, 2018
@macrigiuseppe macrigiuseppe added feature A new feature frequent ask roadmap item Item that's on our current roadmap labels Oct 22, 2018
@macrigiuseppe macrigiuseppe changed the title Store Kepler.gl file onto Dropbox User account Ability to upload maps onto Dropbox Oct 24, 2018
@macrigiuseppe macrigiuseppe changed the title Ability to upload maps onto Dropbox Ability to upload maps to dropbox Oct 24, 2018
@heshan0131 heshan0131 added the rfc label Dec 7, 2018
@macrigiuseppe
Copy link
Collaborator Author

Slight change to the implementation, In order to pass a token from child tab to the parent one we are now using the message feature and then storing the auth token into local storage

@chrisirhc
Copy link
Collaborator

Update based on today's discussion with @macrigiuseppe :
This feature is not yet released pending our work in #307 .

@macrigiuseppe
Copy link
Collaborator Author

macrigiuseppe commented Jan 11, 2019

@yiyaya66 Some legal requirements before we can release as well
In order to interact with Dropbox we have the following requirements:

Kepler.gl uses Dropbox javascript client and the code can be found here.

Dropbox flow in Kepler.gl: #312 (comment)

@briantcl briantcl added this to the Feb 22, 2019 Sprint milestone Feb 22, 2019
@briantcl briantcl removed this from the 02/25/2019 Sprint milestone Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature frequent ask rfc roadmap item Item that's on our current roadmap
Projects
None yet
Development

No branches or pull requests

4 participants