Web: Files: thirdParty: fixed service connection and window closing after connection
This commit is contained in:
parent
173d8195fb
commit
7176819acc
@ -1722,9 +1722,12 @@ export function getOAuthToken(modal) {
|
||||
return new Promise((resolve) => {
|
||||
const interval = setInterval(() => {
|
||||
try {
|
||||
if (modal.json) {
|
||||
if (modal.document.documentElement.innerText) {
|
||||
const converted = JSON.parse(
|
||||
modal.document.documentElement.innerText
|
||||
);
|
||||
clearInterval(interval);
|
||||
const token = modal.json.response;
|
||||
const token = converted.response;
|
||||
if (token) {
|
||||
modal.close();
|
||||
return resolve(token);
|
||||
|
Loading…
Reference in New Issue
Block a user