summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-12-08 11:53:12 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-12-14 12:22:18 +0100
commit9cfcf83f53e0ae897b30705f790c6ebe0b86932e (patch)
tree1f964a18a8c8ef0704e87d162f3852bc403f52ac /config_host
parente0a90aa3239621958bddbb30f98163e8c1ef857f (diff)
tdf#115643 make onedrive work again by switching to graph API
the live SDK method had been deprecated quite a while ago and has been turned off a while back. Notes: While you can access and save existing files using the remote files dialog, creating new files or using "save as" requires using the LibreOffice open/save dialogs. Authentication is clunky: username and password you're asked when creating a new connection is not used at all for connecting, so only fill out a username to label your onedrive entry. Actual authentication is done in browser - copy'n'paste the URL from the dialog into the browser, login and approve access for LibreOffice (approving access only necessary once), then you get redirected to localhost, ignore that there is nothing to display. The important part is the code from the URL-bar. Copy and paste that into the LibreOffice dialog and LO can request an authentication token for API access. Testing this feature requires compiling with corresponding api-keys specified in configure/having an app registered with microsoft. Change-Id: I2db11ac09f9fdc354a10d6c749b2bec84b5d34a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107646 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'config_host')
-rw-r--r--config_host/config_oauth2.h.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/config_host/config_oauth2.h.in b/config_host/config_oauth2.h.in
index f3616ee38162..a95015b41f3e 100644
--- a/config_host/config_oauth2.h.in
+++ b/config_host/config_oauth2.h.in
@@ -35,13 +35,13 @@
/* OneDrive */
-#define ONEDRIVE_BASE_URL "https://apis.live.net/v5.0"
+#define ONEDRIVE_BASE_URL "https://graph.microsoft.com/v1.0"
#define ONEDRIVE_CLIENT_ID ""
#define ONEDRIVE_CLIENT_SECRET ""
-#define ONEDRIVE_AUTH_URL "https://login.live.com/oauth20_authorize.srf"
-#define ONEDRIVE_TOKEN_URL "https://login.live.com/oauth20_token.srf"
-#define ONEDRIVE_REDIRECT_URI "https://login.live.com/oauth20_desktop.srf"
-#define ONEDRIVE_SCOPE "wl.skydrive_update wl.offline_access"
+#define ONEDRIVE_AUTH_URL "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
+#define ONEDRIVE_TOKEN_URL "https://login.microsoftonline.com/common/oauth2/v2.0/token"
+#define ONEDRIVE_REDIRECT_URI "http://localhost/LibreOffice"
+#define ONEDRIVE_SCOPE "Files.ReadWrite offline_access"
#endif