
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
react-native-jwt-decode
Advanced tools
Generate and decode JWT inside of a React Native app without error
Generate and decode JWTs inside of React Native applications seamlessly.
This library provides a simple and consistent approach to encoding and decoding JSON Web Tokens (JWT) in React Native without the dependency on native modules, making it ideal for use with Expo and other pure JS environments.
exp, nbf, iat, sub, iss, and aud.npm install react-native-jwt-decode
To decode a JWT token:
import { decode } from 'react-native-jwt-decode';
const token = 'your.jwt.token';
const decoded = decode(token);
console.log(decoded); // The decoded payload of the JWT
To contribute to this library, you should have Node.js installed. Once you have cloned the repository, install the dependencies:
npm install
This library uses Jest for testing. Run the tests with:
npm test
To transpile the source code from ES6+ to compatible JavaScript, run:
npm run build
Contributions are welcome! Please read the contributing guide to learn how to contribute to the repository and the development workflow.
If you encounter any problems or have suggestions, please open an issue on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Generate and decode JWT inside of a React Native app without error
The npm package react-native-jwt-decode receives a total of 35 weekly downloads. As such, react-native-jwt-decode popularity was classified as not popular.
We found that react-native-jwt-decode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.