@manujdhull/nestjs-pkce-oauth2
Version:
A NestJS plugin to simplify OAuth2 PKCE flow integration, including decorators, guards, and token/session management.
25 lines (16 loc) • 1.07 kB
Markdown
# @manujdhull/nestjs-pkce-oauth2
[](https://www.npmjs.com/package/@manujdhull/nestjs-pkce-oauth2)
[](LICENSE)
[](https://www.npmjs.com/package/@manujdhull/nestjs-pkce-oauth2)
A **NestJS plugin for OAuth 2.0 with PKCE support**, providing decorators, guards, and token/session management to make secure authentication easy — especially with providers like **Google**, **GitHub**, or **Auth0**.
## ✨ Features
- 🔐 Built-in support for **PKCE (Proof Key for Code Exchange)**
- ⚙️ Decorators: `@OAuthInitiate()` and `@OAuthCallback()` for easy route integration
- 🛡️ `StateGuard` for CSRF protection during auth flow
- 🧠 `TokenStoreService` abstraction for token persistence
- ✅ Works out of the box with `@nestjs/platform-express`
## 📦 Installation
```bash
npm install @manujdhull/nestjs-pkce-oauth2