File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ const popup = new DropboxPopup({
25252 . Run the popup window, giving your callback function for use with the ` DropboxAuth ` object
2626
2727```
28- popup.authUser((auth) => {
28+ popup.authUser().then( (auth) => {
2929 const dbx = new Dropbox(auth);
30- }
30+ }).catch((error) => {
31+ console.err(error);
32+ })
3133```
3234
3335## Distributions
@@ -41,7 +43,7 @@ npm install --save-dev dropbox-oauth-popup
4143Or you can use it directly in your browser be including the following tag
4244
4345```
44- <script src="https://cdn.jsdelivr.net/npm/dropbox-oauth-popup@1.4 .1"></script>
46+ <script src="https://cdn.jsdelivr.net/npm/dropbox-oauth-popup@2.0 .1"></script>
4547```
4648
4749## License
Original file line number Diff line number Diff line change 55 < script src ="https://cdn.jsdelivr.net/npm/promise-polyfill@7/dist/polyfill.min.js "> </ script >
66 < script src ="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js "> </ script >
77 < script src ="https://cdn.jsdelivr.net/npm/dropbox/dist/Dropbox-sdk.js "> </ script >
8- < script src ="https://cdn.jsdelivr.net/npm/dropbox-oauth-popup@2.0.0 /dist/dropboxPopup.js "> </ script >
8+ < script src ="https://cdn.jsdelivr.net/npm/dropbox-oauth-popup@2.0.1 /dist/dropboxPopup.js "> </ script >
99</ head >
1010
1111< body >
@@ -29,7 +29,7 @@ <h1>Dropbox OAuth Popup Window</h1>
2929 } ) ;
3030 function runAuth ( ) {
3131 document . getElementById ( "result" ) . innerHTML = "Waiting for auth..." ;
32- popup . authUser ( ( auth ) => {
32+ popup . authUser ( ) . then ( ( auth ) => {
3333 const dbx = new Dropbox . Dropbox ( auth ) ;
3434 dbx . usersGetCurrentAccount ( )
3535 . then ( ( response ) => {
Original file line number Diff line number Diff line change 11{
22 "name" : " dropbox-oauth-popup" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "registry" : " npm" ,
55 "description" : " This is a simple addition built onto the Dropbox SDK that allows for OAuth in the browser to be done via a popup window." ,
66 "homepage" : " https://github.com/rogebrd/dropbox-oauth-popup" ,
You can’t perform that action at this time.
0 commit comments