You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

oauth-pkce

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

4

package.json
{
"name": "oauth-pkce",
"version": "0.0.2",
"version": "0.0.3",
"description": "OAUTH PKCE code_verifier and code_challenge generator",

@@ -68,3 +68,3 @@ "main": "./dist/index.js",

},
"gitHead": "bf02790db34419a57e3be30912e672ae65cae793"
"gitHead": "beb798096052c1ecd60de13b0dee2ed44c4f91cf"
}

@@ -15,4 +15,8 @@ # OAUTH PKCE code_verifier and code_challenge Generator for IE 11 and Modern Browsers

https://cdn.jsdelivr.net/npm/oauth-pkce@0.0.1/dist/oauth-pkce.min.js
https://cdn.jsdelivr.net/npm/oauth-pkce@latest/dist/oauth-pkce.min.js
or with version
https://cdn.jsdelivr.net/npm/oauth-pkce@0.0.2/dist/oauth-pkce.min.js
## Usage

@@ -24,3 +28,3 @@

```javasript
```JavaScript
import getPkce from 'oauth-pkce'

@@ -40,4 +44,4 @@

```javasript
<script src="https://cdn.jsdelivr.net/npm/oauth-pkce@0.0.1/dist/oauth-pkce.min.js" async defer></script>
```JavaScript
<script src="https://cdn.jsdelivr.net/npm/oauth-pkce@0.0.2/dist/oauth-pkce.min.js" async defer></script>

@@ -51,2 +55,25 @@ getPkce(43, (error, { verifier, challenge }) => {

React
```JSX
import React, { useEffect, useState } from 'react';
import getPkce from 'oauth-pkce';
function Pkce() {
const { pkce, setPkce } = useState({});
useEffect(() => {
// getPkce relies on the window object for its crypto api
// put in in useEffect
getPkce(50, (error, { verifier, challenge }) => {
setPkce({ verifier, challenge });
});
}, []);
return (
<div>{pkce.verifier} | {pkce.challenge}</div>
);
}
```
This package uses callback style for minimising code size and compatibility with IE 11. Wrapp it in a Promise if you prefer async await style.

@@ -53,0 +80,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc