From c4ec91f61a41b9d8ec6170782f992b41b04ccec9 Mon Sep 17 00:00:00 2001 From: antelle Date: Mon, 1 Mar 2021 18:03:13 +0100 Subject: [PATCH] fix #1713: OneDrive authentication on web --- app/scripts/const/cloud-storage-apps.js | 6 ++++-- app/scripts/storage/impl/storage-onedrive.js | 4 +++- release-notes.md | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/scripts/const/cloud-storage-apps.js b/app/scripts/const/cloud-storage-apps.js index 8c9f67ea..c5755e26 100644 --- a/app/scripts/const/cloud-storage-apps.js +++ b/app/scripts/const/cloud-storage-apps.js @@ -26,10 +26,12 @@ const GDriveApps = { const OneDriveApps = { Local: { - id: 'b97c53d5-db5b-4124-aab9-d39195293815', - secret: 'V9b6:iJU]N7cImE1f_OLNjqZJDBnumR?' + id: 'b97c53d5-db5b-4124-aab9-d39195293815' }, Production: { + id: 'bbc74d1b-3a9c-46e6-9da4-4c645e830923' + }, + Desktop: { id: 'bbc74d1b-3a9c-46e6-9da4-4c645e830923', secret: 'aOMJaktJEAs_Tmh]fx4iQ[Zd3mp3KK7-' } diff --git a/app/scripts/storage/impl/storage-onedrive.js b/app/scripts/storage/impl/storage-onedrive.js index 8643c14d..b8995333 100644 --- a/app/scripts/storage/impl/storage-onedrive.js +++ b/app/scripts/storage/impl/storage-onedrive.js @@ -222,7 +222,9 @@ class StorageOneDrive extends StorageBase { let clientId = this.appSettings.onedriveClientId; let clientSecret = this.appSettings.onedriveClientSecret; if (!clientId) { - if (Features.isLocal) { + if (Features.isDesktop) { + ({ id: clientId, secret: clientSecret } = OneDriveApps.Desktop); + } else if (Features.isLocal) { ({ id: clientId, secret: clientSecret } = OneDriveApps.Local); } else { ({ id: clientId, secret: clientSecret } = OneDriveApps.Production); diff --git a/release-notes.md b/release-notes.md index ab11de3f..02dc9f52 100644 --- a/release-notes.md +++ b/release-notes.md @@ -17,6 +17,7 @@ Release notes ##### v1.16.8 (TBD) `-` fix #1726: search in protected fields +`-` fix #1713: OneDrive authentication on web ##### v1.16.7 (2020-12-31) `-` fix #1671: new lines removal issue in notes