New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-pkce-challenge

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-pkce-challenge

Proof Key for Code Exchange (PKCE) challenge generator for React Native

  • 6.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

React Native PKCE Challenge

Package version MIT license PRs Welcome

Proof Key for Code Exchange (PKCE) challenge generator for React Native.

API Compatibility

PlatformSupport
iOS🟢
Android🟢
Web🟢
Windows🟡
macOS🟢
Expo🟢
Node.js🟢

Installation

New Arch

yarn add react-native-pkce-challenge
npx pod-install

Old Arch

yarn add react-native-pkce-challenge@5.3.2
npx pod-install

Usage

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; // true

Verify Challenge

import { verifyChallenge } from 'react-native-pkce-challenge';

verifyChallenge(challenge.codeVerifier, challenge.codeChallenge); // true
verifyChallenge(challenge.codeVerifier, 'invalid challenge'); // false

Upgrading

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

Keywords

FAQs

Package last updated on 15 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc