You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const middlePart = Base64.decode(token.split('.')[1]); <-- here a whitespace is included.
the issue here is in the Base64.decode function, for some reason is adding a whitespace when decoding the string.
A possible solution could be changing the decoder to use atob? it will save some time debugging the current implementation for the decoder.
file location: src/utils/base64.js
Method: decode
Patch:
var Base64 = {
.....
// replace current decode function
// public method for decoding
decode: function (input) {
return decodeURIComponent(atob(input));
}
}
Hello guys!
What is about this issue? I have the same:
SyntaxError: Unexpected non-whitespace character after JSON at position 5112
at JSON.parse ()
at jwtExp (isTokenExpired.js:17:1)
at exports.isTokenExpired (isTokenExpired.js:6:1)
at createAuthProvider.js:72:1
at step (createAuthProvider.js:33:1)
at Object.next (createAuthProvider.js:14:1)
at createAuthProvider.js:8:1
at new Promise ()
On the version 2.3.8 I'm experiencing an issue with the jwtExp function.
unexpected non-whitespace character after JSON data at line 1 column 117 of the JSON data.
Rolling back to 2.3.6 fix the issue.
The text was updated successfully, but these errors were encountered: