{"id":21406616,"url":"https://github.com/ringcentral/easy-pkce","last_synced_at":"2025-07-14T00:32:35.260Z","repository":{"id":66137927,"uuid":"366152485","full_name":"ringcentral/easy-pkce","owner":"ringcentral","description":"EASY-PKCE project is a small lib that generates strings for PKCE, as known as Proof Key for Code Exchange. PKCE is a mechanism that came into being to make the use of OAuth 2.0 Authorization Code grant more secure in certain cases. It was originally designed to protect mobile apps, but its ability to prevent authorization code injection makes it useful for every OAuth client, even web apps that use a client secret.","archived":false,"fork":false,"pushed_at":"2023-11-15T10:10:15.000Z","size":11,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-06-30T10:48:03.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ringcentral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-10T19:20:56.000Z","updated_at":"2024-06-12T02:36:21.000Z","dependencies_parsed_at":"2024-04-08T21:51:54.307Z","dependency_job_id":null,"html_url":"https://github.com/ringcentral/easy-pkce","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":"0.19999999999999996","last_synced_commit":"34e68c67a55cb8cbeb58072bbc6cc16272cfcdca"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ringcentral/easy-pkce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Feasy-pkce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Feasy-pkce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Feasy-pkce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Feasy-pkce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringcentral","download_url":"https://codeload.github.com/ringcentral/easy-pkce/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Feasy-pkce/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265227898,"owners_count":23731059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T16:40:54.905Z","updated_at":"2025-07-14T00:32:34.445Z","avatar_url":"https://github.com/ringcentral.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EASY-PKCE #\n\n[![Build Status](https://github.com/ringcentral/easy-pkce/workflows/CI%20Pipeline/badge.svg?branch=develop)](https://github.com/ringcentral/easy-pkce/actions)\n[![NPM version](https://img.shields.io/npm/v/@ringcentral/easy-pkce.svg?style=flat-square)](https://www.npmjs.com/package/@ringcentral/easy-pkce)\n## Description ##\n\nEASY-PKCE project is a small lib that generates strings for PKCE, as known as Proof Key for Code Exchange. PKCE is a mechanism that came into being to make the use of OAuth 2.0 Authorization Code grant more secure in certain cases. It was originally designed to protect mobile apps, but its ability to prevent authorization code injection makes it useful for every OAuth client, even web apps that use a client secret.\n\n## Usages ##\n\n```ts\nimport {\n  generateCodeChallenge,\n  generateCodeVerifier,\n  generateState,\n  generateRandomString,\n} from 'easy-pkce';\n\n// get a base64url-encoded random string from a 32-octet sequence\nconst randomString = generateRandomString(32);\n\n// get a url safe code verifier from a random 42-octet sequence\nconst codeVerifier_1 = generateCodeVerifier(42);\nconst codeVerifier_2 = generateCodeVerifier(); // default octet length is 32\n\n// get a url safe state from a random 12-octet sequence\nconst state_1 = generateState(12);\nconst state_2 = generateState(); // default octet length is 32\n\n// get the code challenge from the code verifier\nconst codeChallenge_1 = generateCodeChallenge(codeVerifier_1, 'plain'); // plain version\nconst codeChallenge_2 = generateCodeChallenge(codeVerifier_2, 'S256'); // S256 version\n\n// get a pair of code verifier and code challenge\nconst {codeVerifier, codeChallenge} = generatePair(\"S256\", 32);\n```\n\n## LICENSE [MIT](LICENSE) ##","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Feasy-pkce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringcentral%2Feasy-pkce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Feasy-pkce/lists"}