From 0910f5d0a6831cf815f27cee4394181e2dc4c2cd Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Tue, 17 Mar 2026 07:31:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(tkeg):=20JWT=20=ED=8C=8C=EC=8B=B1=20?= =?UTF-8?q?=EC=8B=9C=20=ED=95=9C=EA=B8=80=20=EC=9D=B4=EB=A6=84=20=EA=B9=A8?= =?UTF-8?q?=EC=A7=90=20=EC=88=98=EC=A0=95=20(UTF-8=20=EB=94=94=EC=BD=94?= =?UTF-8?q?=EB=94=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- tkeg/web/src/App.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tkeg/web/src/App.jsx b/tkeg/web/src/App.jsx index e9ac65b..2d70015 100644 --- a/tkeg/web/src/App.jsx +++ b/tkeg/web/src/App.jsx @@ -23,7 +23,12 @@ function parseJwt(token) { try { const base64Url = token.split('.')[1]; const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); - return JSON.parse(atob(base64)); + const jsonPayload = decodeURIComponent( + atob(base64).split('').map(c => + '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + ).join('') + ); + return JSON.parse(jsonPayload); } catch { return null; } }