6.1.0 • Published 11 months ago
react-native-pkce-challenge v6.1.0
React Native PKCE Challenge
Proof Key for Code Exchange (PKCE) challenge generator for React Native.
API Compatibility
| Platform | Support |
|---|---|
| iOS | 🟢 |
| Android | 🟢 |
| Web | 🟢 |
| Windows | 🟡 |
| macOS | 🟢 |
| Expo | 🟢 |
| Node.js | 🟢 |
Installation
New Arch
yarn add react-native-pkce-challenge
npx pod-installOld Arch
yarn add react-native-pkce-challenge@5.3.2
npx pod-installUsage
Generate PKCE Challenge Pair
import pkceChallenge from 'react-native-pkce-challenge';
const challenge = pkceChallenge();The constant challenge will hold an object like the following:
{
codeChallenge: 'XsRstqNrXT76Iop3uMoyyCQmaGthJbKKJwXBSoQXaRk',
codeVerifier: 'OZOHUwLddiPyTFJulnUYnU9jsf7oyULflbFpwj40bE9S77iaeisGvzvaVvvPE7oO-xaV4skxwKDFBBV7JofVNxCgUSauqUDVcVjggE4-M6zthVUmeUrSAHatmIBm_P0_'
}Generate Challenge
import { generateChallenge } from 'react-native-pkce-challenge';
generateChallenge(challenge.codeVerifier) === challenge.codeChallenge; // trueVerify Challenge
import { verifyChallenge } from 'react-native-pkce-challenge';
verifyChallenge(challenge.codeVerifier, challenge.codeChallenge); // true
verifyChallenge(challenge.codeVerifier, 'invalid challenge'); // falseUpgrading
See UPGRADING.md
Changelogs
See CHANGELOGS.md
License
Copyright © 2024 David Angulo, released under the MIT license, see LICENSE.
Made with create-react-native-library
6.1.0
11 months ago
6.0.1
12 months ago
6.0.0
12 months ago
5.3.2
1 year ago
5.3.1
2 years ago
5.3.0
2 years ago
5.2.0
3 years ago
5.1.1
3 years ago
5.0.2
3 years ago
5.1.0
3 years ago
5.0.1
3 years ago
5.0.0
3 years ago
4.0.1
3 years ago
4.0.0
3 years ago
3.2.0
4 years ago
3.0.0
5 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.0
5 years ago
1.0.0
5 years ago