diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-12-08 11:53:12 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2020-12-14 17:27:44 +0100 |
commit | f0a35c0941e137e8cf099e11999e6201c1858f3a (patch) | |
tree | 37891337d5c841269a8cc132b7b5b49aa1b84955 /config_host | |
parent | 7d90b50285f294a3c9cce0b22399fefe3ab46ee5 (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>
(cherry picked from commit 9cfcf83f53e0ae897b30705f790c6ebe0b86932e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107631
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'config_host')
-rw-r--r-- | config_host/config_oauth2.h.in | 10 |
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 |