
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.