From 40c9532af725a0bc267559eea576a13a476f925f Mon Sep 17 00:00:00 2001 From: Tim Arney Date: Thu, 28 Nov 2024 10:07:59 -0500 Subject: [PATCH] add check for hasSecurityQuestions prop --- middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.ts b/middleware.ts index 9715054e98..6675f16707 100644 --- a/middleware.ts +++ b/middleware.ts @@ -56,7 +56,7 @@ const { auth } = NextAuth({ privileges: [], ...(token.newlyRegistered && { newlyRegistered: token.newlyRegistered }), ...(token.deactivated && { deactivated: token.deactivated }), - hasSecurityQuestions: token.hasSecurityQuestions ?? false, + hasSecurityQuestions: token?.hasSecurityQuestions ?? false, }; return session; },