Fix: Onedrive sync is broken on Firefox

This commit is contained in:
eight04 2020-02-15 00:26:15 +08:00
parent 2b16fcabd0
commit 392508ae34

View File

@ -1,4 +1,4 @@
/* global chromeLocal promisify */ /* global chromeLocal promisify FIREFOX */
/* exported tokenManager */ /* exported tokenManager */
'use strict'; 'use strict';
@ -43,7 +43,9 @@ const tokenManager = (() => {
clientSecret: '9Pj=TpsrStq8K@1BiwB9PIWLppM:@s=w', clientSecret: '9Pj=TpsrStq8K@1BiwB9PIWLppM:@s=w',
authURL: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', authURL: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
tokenURL: 'https://login.microsoftonline.com/common/oauth2/v2.0/token', tokenURL: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
redirect_uri: 'https://' + location.hostname + '.chromiumapp.org/', redirect_uri: FIREFOX ?
'https://clngdbkpkpeebahjckkjfobafhncgmne.chromiumapp.org/' :
'https://' + location.hostname + '.chromiumapp.org/',
scopes: ['Files.ReadWrite.AppFolder', 'offline_access'] scopes: ['Files.ReadWrite.AppFolder', 'offline_access']
} }
}; };