This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 84549051b fix(services/onedrive): add scope for the refresh token
(#5776)
84549051b is described below
commit 84549051b377e21ca3ccd03559acd25eb86dee86
Author: Erick Guan <[email protected]>
AuthorDate: Sat Mar 15 03:28:35 2025 +0100
fix(services/onedrive): add scope for the refresh token (#5776)
---
core/src/services/onedrive/core.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/services/onedrive/core.rs
b/core/src/services/onedrive/core.rs
index 35e54aae8..31229b52f 100644
--- a/core/src/services/onedrive/core.rs
+++ b/core/src/services/onedrive/core.rs
@@ -321,7 +321,7 @@ impl OneDriveSigner {
async fn refresh_tokens(&mut self) -> Result<()> {
// OneDrive users must provide at least this required permission scope
let encoded_payload = format!(
-
"client_id={}&client_secret={}&scope=Files.ReadWrite&refresh_token={}&grant_type=refresh_token",
+
"client_id={}&client_secret={}&scope=offline_access%20Files.ReadWrite&refresh_token={}&grant_type=refresh_token",
percent_encode_path(self.client_id.as_str()),
percent_encode_path(self.client_secret.as_str()),
percent_encode_path(self.refresh_token.as_str())