auth0 / node-jsonwebtoken

JsonWebToken implementation for node.js http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html
MIT License
17.75k stars 1.23k forks source link

decode method error in react #891

Open eb-73 opened 1 year ago

eb-73 commented 1 year ago

I have problem with decode method in react library when call decode method. I get this error in console: TypeError, can not read property of undefined

OEvgeny commented 1 year ago

The method was removed silently from the package exports. I'm wondering if this is an error.

devnm21 commented 1 year ago

@eb-73 Try degrading to 8.5.1. Although I'm not sure if it's recommended

OEvgeny commented 1 year ago

Some additional context to my previous comment:

// Works
import { decode } from 'jsonwebtoken';

// Doesn't work
import * as jwt from 'jsonwebtoken';

jwt.decode // undefined