Giter Club home page Giter Club logo

Comments (6)

jfromaniello avatar jfromaniello commented on May 21, 2024

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.

rvetere avatar rvetere commented on May 21, 2024

Ok so i helped out myself... With a handy little code snippet as found on scotch.io (and on many other places):

http://pastebin.com/Kq1pjgpc

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.

jfromaniello avatar jfromaniello commented on May 21, 2024

@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.

rvetere avatar rvetere commented on May 21, 2024

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.

jfromaniello avatar jfromaniello commented on May 21, 2024

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.

jfromaniello avatar jfromaniello commented on May 21, 2024

Done! v2.0.0 doesn't have any dependency.

from jwt-decode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.