oauth2-flows

Implement OAuth 2.0 and OpenID Connect flows with PKCE and JWT verification.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill oauth2-flows
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oauth2-flows
Source: https://github.com/engineers-hub-ltd-in-house-project/eh-skills/tree/main/skills/authentication/oauth2-flows
Command: npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill oauth2-flows

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jose, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides robust patterns for implementing secure OAuth 2.0 and OpenID Connect authentication flows, protecting against common vulnerabilities and ensuring seamless integration with external identity providers.

Core Features & Use Cases

  • Secure Authorization Code + PKCE Flow: Implements the industry-standard flow for web and mobile applications.
  • Token Management: Handles token exchange, refresh token rotation, and ID token verification.
  • Use Case: Integrate Google or GitHub login into your application, ensuring user data is accessed securely and with proper authorization.

Quick Start

Initiate the OAuth 2.0 flow for Google authentication using the provided configuration.

Frequently Asked Questions about oauth2-flows

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement OAuth 2.0 authorization code flow with PKCE?

OAuth 2.0 authorization code flow with PKCE is implemented by generating a code verifier and challenge using standard crypto APIs, then exchanging the authorization code for tokens securely. This Skill provides robust patterns for this exact flow.

How does OpenID Connect ID token verification work with JWT?

OpenID Connect ID token verification validates JWT signatures using the JOSE library to ensure tokens are authentic and untampered. This process confirms user identity securely after the OAuth 2.0 token exchange is completed.

Can I use this to integrate Google and GitHub login for user authentication?

Yes, you can integrate Google and GitHub login for user authentication. The Skill specifically addresses scenarios for connecting these external identity providers to securely manage user data and third-party API access.

Do I need the JOSE library to handle token exchange and refresh token rotation?

Yes, the JOSE dependency is required to handle JWT validation during token exchange and refresh token rotation. It provides the cryptographic functions necessary to verify ID tokens securely.

What is the best way to protect against common vulnerabilities in OAuth 2.0 flows?

The best way to protect against common vulnerabilities in OAuth 2.0 flows is implementing the Authorization Code with PKCE pattern alongside secure token management. This Skill provides these robust patterns to secure web and mobile applications.