feat: add button to sign out to all connected devices
This commit is contained in:
@ -170,13 +170,13 @@ export const UserSettings: React.FC = () => {
|
||||
}
|
||||
|
||||
const handleSignout = async (): Promise<void> => {
|
||||
try {
|
||||
setFetchState('loading')
|
||||
await authentication.signoutServerSide()
|
||||
} catch (error) {
|
||||
setFetchState('error')
|
||||
setMessage('errors:server-error')
|
||||
}
|
||||
setFetchState('loading')
|
||||
await authentication.signoutServerSide()
|
||||
}
|
||||
|
||||
const handleSignoutAllDevices = async (): Promise<void> => {
|
||||
setFetchState('loading')
|
||||
await authentication.signoutAllDevicesServerSide()
|
||||
}
|
||||
|
||||
const handleDeletionProvider = (
|
||||
@ -375,6 +375,11 @@ export const UserSettings: React.FC = () => {
|
||||
{t('application:signout')}
|
||||
</Button>
|
||||
</div>
|
||||
<div className='mt-4'>
|
||||
<Button type='button' color='red' onClick={handleSignoutAllDevices}>
|
||||
{t('application:signout-all-devices')}
|
||||
</Button>
|
||||
</div>
|
||||
<FormState
|
||||
state={fetchState}
|
||||
message={message != null ? t(message) : undefined}
|
||||
|
Reference in New Issue
Block a user