From ae4a68ef536ac3fe97a9a903ce79e7f9b76f2305 Mon Sep 17 00:00:00 2001 From: Hager Eldakroury Date: Thu, 15 Jul 2021 06:28:47 +0200 Subject: [PATCH] fix(auth): token id --- auth/src/routes/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/src/routes/login.ts b/auth/src/routes/login.ts index e60e50e..a676aad 100644 --- a/auth/src/routes/login.ts +++ b/auth/src/routes/login.ts @@ -21,7 +21,7 @@ router.post(`${baseUrl}/login`, async (req, res) => { } const { role, username } = user; - const userJWT = createAccessToken({ username, email, role }); + const userJWT = createAccessToken({ _id: user._id, username, email, role }); return res .status(201)