From f5e9652ab2249e3664e37a76419ff787153f4f23 Mon Sep 17 00:00:00 2001 From: mpmcroy Date: Tue, 2 Mar 2021 10:32:19 -0500 Subject: [PATCH] Fixes unresponsive outline-do-oauth-step (#837) * Fixes return statement * Disconnect account and show intro when DigitalOcean OAuth is cancelled through the Outline Manager --- src/server_manager/web_app/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server_manager/web_app/app.ts b/src/server_manager/web_app/app.ts index 1df3624c..75161801 100644 --- a/src/server_manager/web_app/app.ts +++ b/src/server_manager/web_app/app.ts @@ -341,7 +341,7 @@ export class App { this.appRoot.adminEmail = await this.digitalOceanAccount.getName(); const status = await this.digitalOceanAccount.getStatus(); if (status !== digitalocean.Status.ACTIVE) { - return; + return []; } const servers = await this.digitalOceanAccount.listServers(); for (const server of servers) { @@ -518,6 +518,8 @@ export class App { const oauth = runDigitalOceanOauth(); const handleOauthFlowCancelled = () => { oauth.cancel(); + this.disconnectDigitalOceanAccount(); + this.showIntro(); }; this.appRoot.getAndShowDigitalOceanOauthFlow(handleOauthFlowCancelled); try {