diff --git a/components/Application/UserSettings/UserSettings.tsx b/components/Application/UserSettings/UserSettings.tsx index 4ab3414..2e9e30c 100644 --- a/components/Application/UserSettings/UserSettings.tsx +++ b/components/Application/UserSettings/UserSettings.tsx @@ -170,13 +170,13 @@ export const UserSettings: React.FC = () => { } const handleSignout = async (): Promise => { - try { - setFetchState('loading') - await authentication.signoutServerSide() - } catch (error) { - setFetchState('error') - setMessage('errors:server-error') - } + setFetchState('loading') + await authentication.signoutServerSide() + } + + const handleSignoutAllDevices = async (): Promise => { + setFetchState('loading') + await authentication.signoutAllDevicesServerSide() } const handleDeletionProvider = ( @@ -375,6 +375,11 @@ export const UserSettings: React.FC = () => { {t('application:signout')} +
+ +
{ + try { + await this.api.delete('/users/signout') + } catch {} + this.signout() + } + public signin(): void { cookies.set('refreshToken', this.tokens.refreshToken) }