fix(auth): jwt token decoding

Resolves #388
This commit is contained in:
Mitsuki Tanoue 2025-04-09 01:25:50 +09:00 committed by GitHub
parent c198198598
commit a77175d5b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -279,8 +279,8 @@ export const useAuthStore = defineStore('auth', () => {
try {
const base64 = jwt
.split('.')[1]
.replace('-', '+')
.replace('_', '/')
.replace('/-/g', '+')
.replace('/_/g', '/')
const info = new UserModel(JSON.parse(atob(base64)))
const ts = Math.round((new Date()).getTime() / MILLISECONDS_A_SECOND)