Skip to content
Snippets Groups Projects
Commit 0ffe58ab authored by Christian ZHENG's avatar Christian ZHENG
Browse files

fix(login): persist login state at startup

parent 06d725a6
Branches
Tags
3 merge requests!16feat: publish extension on marketplace with ci,!15feat(Sprint1): add authentication + directory picking + redirection link,!14sprint 1
...@@ -37,7 +37,13 @@ export default class Controller { ...@@ -37,7 +37,13 @@ export default class Controller {
} }
}, },
}); });
this.init();
} }
async init() {
const exensionStorage = ExtensionStore.getInstance();
this.gettingStartedView.isAlreadyConnected = !!(await exensionStorage.getAccessToken());
}
async authenticate() { async authenticate() {
const tokens = await this.connection.getToken({ openLink: Controller.openBrowserWithUrl }); const tokens = await this.connection.getToken({ openLink: Controller.openBrowserWithUrl });
const exensionStorage = ExtensionStore.getInstance(); const exensionStorage = ExtensionStore.getInstance();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment