feat: add button to sign out to all connected devices

This commit is contained in:
Divlo
2022-08-29 20:15:47 +02:00
parent c4bb7c9b17
commit 38e227a9d4
4 changed files with 21 additions and 7 deletions

View File

@ -112,6 +112,13 @@ export class Authentication {
this.signout()
}
public async signoutAllDevicesServerSide(): Promise<void> {
try {
await this.api.delete('/users/signout')
} catch {}
this.signout()
}
public signin(): void {
cookies.set('refreshToken', this.tokens.refreshToken)
}