From b15068932d5156ed222fb3f1122aa854cff3106e Mon Sep 17 00:00:00 2001 From: Kapil Jangid Date: Mon, 7 Oct 2024 01:55:37 +0530 Subject: [PATCH] Refactor: Update authOptions to include user image in session --- src/lib/authOptions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/authOptions.ts b/src/lib/authOptions.ts index e803226e..3f0dd218 100644 --- a/src/lib/authOptions.ts +++ b/src/lib/authOptions.ts @@ -126,6 +126,7 @@ export const authOptions = { token.name = user.name; token.isVerified = user.isVerified; token.role = loggedInUser.role ? loggedInUser.role : user.role; + token.image = loggedInUser ? loggedInUser.avatar : user.image; } return token; },