From 32c902eeae741be18b39c11a8da73bc598ee2b40 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 26 Nov 2020 17:28:02 -0500 Subject: [PATCH] fix: ms onenote export issue --- CHANGELOG.md | 6 ++++++ packages/browser-extension-oauth2/src/Oauth2.js | 3 +++ packages/common/services/integration/onenote/index.js | 2 +- packages/extension/manifest.common.json | 2 +- packages/extension/package.json | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b816f..8901e4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.5.4 + +### Bug fixes + +- Fixes MS OneNote export issue + ## 1.5.3 ### Bug fixes diff --git a/packages/browser-extension-oauth2/src/Oauth2.js b/packages/browser-extension-oauth2/src/Oauth2.js index fddd0a8..3c2b993 100644 --- a/packages/browser-extension-oauth2/src/Oauth2.js +++ b/packages/browser-extension-oauth2/src/Oauth2.js @@ -47,6 +47,9 @@ class Oauth2 { if (params.state !== state) { throw new Error('Invalid state.'); } + if (params.error) { + throw new Error(params.error); + } return this.storage .set(ACESS_TOKEN_KEY, accessToken) .then(() => accessToken); diff --git a/packages/common/services/integration/onenote/index.js b/packages/common/services/integration/onenote/index.js index 1e82f02..e1377c9 100644 --- a/packages/common/services/integration/onenote/index.js +++ b/packages/common/services/integration/onenote/index.js @@ -10,7 +10,7 @@ class OneNote extends Service { const clientId = manifest.browser === 'firefox' ? '5a06bf8d-6526-4b65-a85b-221f6dde2639' - : 'ab2e71d8-340a-4889-8039-26b70504871c'; + : '24fa7402-009b-4526-b067-e6de468fbcc0'; this.oauth2 = new Oauth2({ provider: this.namespace, authorization_endpoint: diff --git a/packages/extension/manifest.common.json b/packages/extension/manifest.common.json index f07863a..f1c3a05 100644 --- a/packages/extension/manifest.common.json +++ b/packages/extension/manifest.common.json @@ -1,6 +1,6 @@ { "name": "YiNote", - "version": "1.5.3", + "version": "1.5.4", "description": "Most efficient way to take & share time-stamped notes while watching videos!", "icons": { "16": "icons/icon-16.png", diff --git a/packages/extension/package.json b/packages/extension/package.json index 8d30217..a241a3e 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "@yi-note/extension", - "version": "1.5.3", + "version": "1.5.4", "description": "Most efficient way to take & share time-stamped notes while watching videos!", "private": false, "keywords": [