Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binyamin/pkce-gen
Generate code challenge & code verifier for PKCE (zero-dependencies)
https://github.com/binyamin/pkce-gen
javascript oauth oauth2 pkce
Last synced: 8 days ago
JSON representation
Generate code challenge & code verifier for PKCE (zero-dependencies)
- Host: GitHub
- URL: https://github.com/binyamin/pkce-gen
- Owner: binyamin
- License: mit
- Created: 2020-09-15T11:17:33.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T15:58:51.000Z (about 3 years ago)
- Last Synced: 2024-10-14T01:57:46.005Z (23 days ago)
- Topics: javascript, oauth, oauth2, pkce
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/pkce-gen
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PKCE Generator
[![npm bundle size](https://img.shields.io/bundlephobia/min/pkce-gen)](https://npmjs.com/package/pkce-gen)
[![CI](https://github.com/binyamin/pkce-gen/workflows/Test/badge.svg)](https://github.com/binyamin/pkce-gen/actions)> Generate code challenge & code verifier for PKCE (zero-dependencies)
**Note**: If you want something, just open an issue.
## Install
```sh
npm install --save pkce-gen
```## Usage
```js
const pkce = require("pkce-gen");pkce.create();
// => {code_verifier, code_challenge}pkce.create({ hasState: true })
// => {...state}
```## Related
- [bukalapak/pkce-npm](https://github.com/bukalapak/pkce-npm) - Same goal as here, and a bit bulkier, but (ostensibly) works in the browser as well.
- [aaronpk/pkce-vanilla-js](https://github.com/aaronpk/pkce-vanilla-js) - Aaron Parecki's demo for doing this in the browser.## License
MIT ©️ [Binyamin Green](https://binyam.in)Crypto-related logic is from [this article](https://www.loginradius.com/engineering/blog/pkce/).