Skip to content

Commit

Permalink
Merge pull request #1274 from remotestorage/feature/1267-dropbox_refr…
Browse files Browse the repository at this point in the history
…esh_tokens

Dropbox: Retrieves & uses refresh token to obtain new access token
  • Loading branch information
raucao committed Oct 27, 2022
2 parents 4506148 + 66e92c4 commit a4139c8
Show file tree
Hide file tree
Showing 26 changed files with 9,356 additions and 4,290 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Run jaribu tests # These must be replaced before we can use Node v18 in CI
run: npm test
- name: Run mocha tests
run: npm run test:mocha
run: npm run test:mocha -- --exit
- name: Run linter
run: npm run lint:quiet
- name: Run webpack
Expand Down
5 changes: 5 additions & 0 deletions doc/contributing/internals/discovery-bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ the user to that URL. When the dance comes back, the library will detect
the ``access_token`` from the window location during the page load, and
from that point onwards, the remote is connected.

If the OAuth flow is PKCE, the window location will contain a ``code``
parameter instead of ``access_token``. RS then makes a fetch to
remote.TOKEN_URL with the code, to retrieve the access token, and possibly
a refresh token as well.

.. _storage-first section: https://tools.ietf.org/html/draft-dejong-remotestorage-09#section-11
11 changes: 8 additions & 3 deletions doc/getting-started/dropbox-and-google-drive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ Dropbox
An app key can be obtained by `registering your app
<https://www.dropbox.com/developers/apps>`_.

* Create a new app for the "Dropbox API", with "Full Dropbox access"
* Create a new "scoped" app for the "Dropbox API", with these scopes:
* account_info.read
* files.metadata.read
* files.metadata.write
* files.content.read
* files.content.write
* You need to set one or more OAuth2 redirect URIs for all routes a user can
connect from, for example ``http://localhost:8000/`` for an app you are
developing locally.
connect from, for example ``http://localhost:8000`` for an app you are
developing locally. If the path is '/', rs.js drops it.

Known issues
^^^^^^^^^^^^
Expand Down

0 comments on commit a4139c8

Please sign in to comment.