https://github.com/codesandtags/examples-oauth
This repository contains examples of implementing OAuth 2.0 flows using Node.js and Express.js
https://github.com/codesandtags/examples-oauth
Last synced: about 1 year ago
JSON representation
This repository contains examples of implementing OAuth 2.0 flows using Node.js and Express.js
- Host: GitHub
- URL: https://github.com/codesandtags/examples-oauth
- Owner: codesandtags
- Created: 2024-12-07T00:17:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-11T21:34:35.000Z (over 1 year ago)
- Last Synced: 2025-03-13T09:37:16.233Z (over 1 year ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Examples of OAuth 2.0 Flows
This repository contains examples of implementing OAuth 2.0 flows using Node.js and Express.js. Each subfolder demonstrates a different flow:
- `authorization-code`: Implements the traditional OAuth 2.0 Authorization Code flow.
- `pkce`: Implements the OAuth 2.0 Authorization Code flow with PKCE for enhanced security.
## Prerequisites
1. Install [Node.js](https://nodejs.org/).
2. Clone this repository:
```bash
git clone
```
3. Install dependencies for each example:
```bash
cd examples-oauth/
npm install
```
4. Replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET (if applicable), and https://example.com/oauth with your actual OAuth provider details in the code.
## References
- [RFC 6749: The OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749)
- [RFC 7636: Proof Key for Code Exchange by OAuth Public Clients](https://tools.ietf.org/html/rfc7636)
- [RFC 9126: OAuth 2.0 Pushed Authorization Requests (PAR)](https://tools.ietf.org/html/rfc9126)