Comments (6)
Node.js has been always able to encode/decode base64.
New browsers can do it as well. The reason I used this library was to support old browsers
from jwt-decode.
Ok so i helped out myself... With a handy little code snippet as found on scotch.io (and on many other places):
Create your own little class with this implementation for example and i was able to remove "jwt-decode" completely from my project and my auth0 demo impl finally works now :)
from jwt-decode.
@rvetere Yes, I will take care of this. node.js always supported base64 encoding/decoding, the reason I used a pure js module was to support old browsers.
from jwt-decode.
Yes i've understood this point already on the first reading.. it's just not really helpful information when your stuck with your setup just because of an un-installable package ;) So, what will the fix will be..? Will the auth0 package soon be updated to latest packages or.. you still waiting until angular2 becomes more "final"..? I mean, the auth0 demo project is still include beta.0.. two weeks ago beta.8 was relased and 1 day ago, beta.9 came out... it is actually extremely outdated..
And so far as i can see - the part where the decode is used most, it is unfortunately on the client.. you will never have nodejs there to support your base64 ;)
I just wanted to post my solution here so others may find help by going trough this thread.
from jwt-decode.
Sorry I didn't see my previous response hahha.
I just tried using Buffer directly and it works in the browser, but the problem is that the size increases by a factor of 10x...
I will test this one:
https://github.com/davidchambers/Base64.js
from jwt-decode.
Done! v2.0.0 doesn't have any dependency.
from jwt-decode.
Related Issues (20)
- Thoughts on adding a bin? HOT 3
- Two additional tests? HOT 4
- jwtDecode is not a function HOT 3
- Does not work with electron packager/asar archive HOT 5
- ESM Support with Jest for Node Api clients HOT 2
- How about removing the atob polyfill? HOT 8
- Consider renaming `master` branch to `main` HOT 2
- Type definitions are broken in 4.0.0-beta.1 HOT 10
- Consider dropping Universal Module Definition (UMD) bundle HOT 4
- Yarn installing jwt-decode causes nx Daemon to crash HOT 4
- Using jwt-decode beta with node10 module resolution HOT 8
- InvalidTokenError: Invalid token specified: Unexpected number at position 0 HOT 3
- missing: https://unpkg.com/[email protected]/build/jwt-decode.js HOT 3
- v4.0.0 React Native support - property atob doesn't exist HOT 9
- No Support for React Native & Expo HOT 2
- Compatibility Issue with Node.js 16.18.1 on Expo Application Servers HOT 2
- React native decode HOT 1
- InvalidTokenError HOT 3
- jwt decode is not working in react native HOT 2
- jwtDecode is not working react native app 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 jwt-decode.