feat: logout

This commit is contained in:
MingLiang Wang
2023-01-09 21:59:19 +08:00
parent f4eb4740d8
commit 79a760a042

View File

@@ -127,16 +127,16 @@ export class DataCenter {
public async login(providerId = 'affine') {
const provider = this.providerMap.get(providerId);
assert(provider, `provide '${providerId}' is not registered`);
provider.auth();
await provider.auth();
}
/**
* logout from all providers
*/
public async logout() {
this.providers.forEach(p => {
p.logout();
});
public async logout(providerId = 'affine') {
const provider = this.providerMap.get(providerId);
assert(provider, `provide '${providerId}' is not registered`);
await provider.logout();
}
/**