mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat: logout
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user