Password change needs to require user login to reset some cookies

closes #1793
This commit is contained in:
Dane Everitt 2019-12-28 12:07:42 -08:00
parent 5f13531c69
commit 158958d82d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 25 additions and 8 deletions

View file

@ -34,8 +34,8 @@ export default () => {
clearFlashes('account:password');
updateAccountPassword({ ...values })
.then(() => {
resetForm();
addFlash({ key: 'account:password', type: 'success', message: 'Your password has been updated.' });
// @ts-ignore
window.location = '/auth/login';
})
.catch(error => addFlash({
key: 'account:password',

View file

@ -11,7 +11,12 @@ type Props = Readonly<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElemen
export default ({ title, borderColor, showFlashes, children, ...props }: Props) => (
<div {...props}>
{title && <h2 className={'text-neutral-300 mb-4 px-4'}>{title}</h2>}
{showFlashes && <FlashMessageRender byKey={typeof showFlashes === 'string' ? showFlashes : undefined}/>}
{showFlashes &&
<FlashMessageRender
byKey={typeof showFlashes === 'string' ? showFlashes : undefined}
className={'mb-4'}
/>
}
<div className={classNames('bg-neutral-700 p-4 rounded shadow-lg relative', borderColor, {
'border-t-4': !!borderColor,
})}>