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; } }