Search code examples
react-nativedecodejwtverify

decode token in React Native


Is there any library / NPM module / code sample to verify and decode a JWT in React Native? like jsonwebtoken(does not work in React Native)jsonwebtoken dont works in react native for verify jwt token


Solution

  • i solve this problem by using jwt-decode library .

    firstly i decode the token thene verify the Identifies principal that issued the JWT. if the iss is from my site i use the token and if it is not from my site i destroy the token