ws: send auth-deny and reload page

This commit is contained in:
vchikalkin 2024-07-18 20:57:59 +03:00
parent 67019e3aba
commit 658b678d80
2 changed files with 8 additions and 1 deletions

View File

@ -98,7 +98,9 @@ export class LdapTfaController extends LdapController {
status: HttpStatus.OK,
})
@UsePipes(new ValidationPipe({ transform: true }))
async telegramReject(@Query() _query: TelegramDto, @Res() reply: FastifyReply) {
async telegramReject(@Query() query: TelegramDto, @Res() reply: FastifyReply) {
this.ldapTfaGateway.notify('auth-deny', query);
return reply.status(200).send({ success: true });
}

View File

@ -87,6 +87,11 @@ export function useTelegramConfirm() {
})
);
});
socket.on('auth-deny', () => {
socket.off('connect');
window.location.reload();
});
}
return () => {