diff --git a/apps/api/src/ldap-tfa/ldap-tfa.controller.ts b/apps/api/src/ldap-tfa/ldap-tfa.controller.ts index 1a914e4..e23bf0b 100644 --- a/apps/api/src/ldap-tfa/ldap-tfa.controller.ts +++ b/apps/api/src/ldap-tfa/ldap-tfa.controller.ts @@ -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 }); } diff --git a/apps/web/components/Form/hooks/telegram.ts b/apps/web/components/Form/hooks/telegram.ts index 89a666d..617cdf4 100644 --- a/apps/web/components/Form/hooks/telegram.ts +++ b/apps/web/components/Form/hooks/telegram.ts @@ -87,6 +87,11 @@ export function useTelegramConfirm() { }) ); }); + + socket.on('auth-deny', () => { + socket.off('connect'); + window.location.reload(); + }); } return () => {