From 3d830a64bd251cfcf4c9d32b23dce38625debfb3 Mon Sep 17 00:00:00 2001 From: walnuts1018 Date: Wed, 8 Nov 2023 00:03:36 +0900 Subject: [PATCH] Fix refresh token lock key in authOptions --- front/src/app/api/auth/[...nextauth]/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/app/api/auth/[...nextauth]/options.ts b/front/src/app/api/auth/[...nextauth]/options.ts index eb86e21..8f6e4f8 100644 --- a/front/src/app/api/auth/[...nextauth]/options.ts +++ b/front/src/app/api/auth/[...nextauth]/options.ts @@ -44,7 +44,7 @@ export const authOptions: NextAuthOptions = { if (user) { token.role = user.role; } - lock.acquire("refreshToken" + user.sub, async function (done) { + lock.acquire("refreshToken" + token.sub as string, async function (done) { try { if (account) { token.refreshToken = account.refresh_token;