mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2026-06-23 04:10:17 +00:00
fix(csrf): refresh token after user has deleted their account
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
committed by
Philip Molares
parent
3c18898e47
commit
5b026c052a
@@ -12,6 +12,7 @@ import { useUiNotifications } from '../../notifications/ui-notification-boundary
|
||||
import React, { useCallback } from 'react'
|
||||
import { Button, Modal } from 'react-bootstrap'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { refreshCsrfToken } from '../../../redux/csrf-token/methods'
|
||||
|
||||
/**
|
||||
* Confirmation modal for deleting your account.
|
||||
@@ -27,7 +28,10 @@ export const AccountDeletionModal: React.FC<ModalVisibilityProps> = ({ show, onH
|
||||
deleteUser()
|
||||
.then(() => {
|
||||
clearUser()
|
||||
return dispatchUiNotification(
|
||||
return refreshCsrfToken()
|
||||
})
|
||||
.then(() => {
|
||||
dispatchUiNotification(
|
||||
'profile.modal.deleteUser.notificationTitle',
|
||||
'profile.modal.deleteUser.notificationText',
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user