Comments (2)
Added some debugging prints to source code and tested this. The error comes from base64 decoding:
str is: eyI_IjoiYWE_In0
output is: eyI/IjoiYWE_In0=
app.js:12 ERROR IS: DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. {message: "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.", name: "InvalidCharacterError", code: 5, stack: "Error: Failed to execute 'atob' on 'Window': The s…t b (http://localhost:8000/dist/js/app.js:4:9676)", INDEX_SIZE_ERR: 1…}code: 5message: "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."name: "InvalidCharacterError"stack: "Error: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.↵ at Error (native)↵ at url_base64_decode (http://localhost:8000/dist/js/app.js:2:5907)↵ at window.decode (http://localhost:8000/dist/js/app.js:12:5780)↵ at d (http://localhost:8000/dist/js/app.js:12:7527)↵ at a.signal (http://localhost:8000/dist/js/app.js:6:29153)↵ at Vb (http://localhost:8000/dist/js/app.js:4:6439)↵ at jc (http://localhost:8000/dist/js/app.js:4:11226)↵ at b (http://localhost:8000/dist/js/app.js:4:9676)"**proto**: DOMException
For some reason, string.replace('_','/')
manages to replace only the first occurence. It would also seem that this is translated to string.replace(/_/g,'/')
by some js preprocessing step.
from jsonwebtoken.github.io.
Actually no! Some other part of source code had string.replace(/_/g,'/')
, this one is kept as string.replace('_','/')
which indeed replaces only the first occurence. I will make a pull to fix this.
from jsonwebtoken.github.io.
Related Issues (20)
- Fix tooltip for unix timestamps HOT 1
- link to libraries page with a language preselected
- Support Compact Serialization, "zip": "DEF" HOT 3
- Unauthorized
- HS256 signature validation seems not working properly HOT 3
- Debugger support for unsecured JWTs HOT 2
- RS256 signature verification simply indicates "invalid signature" with small key size HOT 4
- "Invalid signature" message appears at the bottom of the screen, which can make it hard to see HOT 1
- extension: Migrate to Chrome extension manifest v3 HOT 1
- Running grunt build-website doesn't fully build the website HOT 2
- ES256 signature not valid HOT 6
- after click the Decode Header Box at main Page, part of the text auto delete HOT 4
- Making Animated JWT icon HOT 1
- menu-trigger is missing - can't close navbar closed open HOT 1
- Jacquria Nelson
- Enable more seamless pasting of a token - add a "clear" button or preselect the jwt content in textarea HOT 6
- Duplicate sub in payload is not reported in jwt.io HOT 3
- Allow passing a JWT as URI fragment HOT 3
- Put ids on the headers in the FAQ to allow linking HOT 2
- Number content omitts zero decimal places HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonwebtoken.github.io.