Open VA1992 opened 2 years ago
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 (
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.