From 237aeb970f2afc3fd52178f39e5a8f5f4fa094df Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 14 May 2024 16:16:34 +0300 Subject: [PATCH] fix pass user to submit button --- apps/api/src/ldap-tfa/ldap-tfa.controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/api/src/ldap-tfa/ldap-tfa.controller.ts b/apps/api/src/ldap-tfa/ldap-tfa.controller.ts index c991846..5691bc5 100644 --- a/apps/api/src/ldap-tfa/ldap-tfa.controller.ts +++ b/apps/api/src/ldap-tfa/ldap-tfa.controller.ts @@ -24,7 +24,9 @@ export class LdapTfaController extends LdapController { audience: 'auth', }); - return reply.setCookie(env.COOKIE_TOKEN_NAME, token, cookieOptions).status(200).send(); + const user = await this.ldapService.getUser(token); + + return reply.setCookie(env.COOKIE_TOKEN_NAME, token, cookieOptions).status(200).send(user); } catch { throw new HttpException('Unauthorized', HttpStatus.UNAUTHORIZED); }