Fixes unresponsive outline-do-oauth-step (#837)

* Fixes return statement

* Disconnect account and show intro when DigitalOcean OAuth is cancelled through the Outline Manager
This commit is contained in:
mpmcroy 2021-03-02 10:32:19 -05:00 committed by GitHub
parent da61d6d4c7
commit f5e9652ab2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {