fix(auth): fix regex in JWT decoding causing login issues for Chinese/Japanese user names (#809)
This commit is contained in:
parent
c4566fdb53
commit
33e78c35da
|
|
@ -284,8 +284,8 @@ export const useAuthStore = defineStore('auth', () => {
|
|||
try {
|
||||
const base64 = jwt
|
||||
.split('.')[1]
|
||||
.replace('/-/g', '+')
|
||||
.replace('/_/g', '/')
|
||||
.replace(/-/g, '+')
|
||||
.replace(/_/g, '/')
|
||||
const info = new UserModel(JSON.parse(atob(base64)))
|
||||
const ts = Math.round((new Date()).getTime() / MILLISECONDS_A_SECOND)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue