From 9d9526c5d1c93682e5d21ee2d7d66b172522423e Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 11 Mar 2018 23:20:53 +0300 Subject: CloudFile: fix OneDrive token refresh --- plugins/CloudFile/src/Services/microsoft_api.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/CloudFile/src/Services/microsoft_api.h') diff --git a/plugins/CloudFile/src/Services/microsoft_api.h b/plugins/CloudFile/src/Services/microsoft_api.h index 3dcb34e2ba..5c8abafeb3 100644 --- a/plugins/CloudFile/src/Services/microsoft_api.h +++ b/plugins/CloudFile/src/Services/microsoft_api.h @@ -35,9 +35,10 @@ namespace OneDriveAPI { AddHeader("Content-Type", "application/x-www-form-urlencoded"); - CMStringA data(CMStringDataFormat::FORMAT, - "client_id=%s&grant_type=refresh_token&refresh_token=%s", - MS_APP_ID, refreshToken); + CMStringA data = "redirect_uri=https://oauth.miranda-ng.org/verification"; + data.Append("&scope=offline_access https://graph.microsoft.com/files.readWrite"); + data.AppendFormat("&client_id=%s&client_secret=%s", MS_APP_ID, MS_CLIENT_SECRET); + data.AppendFormat("&grant_type=refresh_token&refresh_token=%s", refreshToken); SetData(data.GetBuffer(), data.GetLength()); } }; -- cgit v1.2.3