auth-github-skill

Implement GitHub OAuth 2.0 authentication with token management and CSRF protection.

2|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/javimosch/superbackend --skill auth-github-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-github-skill
Source: https://github.com/javimosch/superbackend/tree/main/.agents/skills/auth-github
Command: npx skills add https://github.com/javimosch/superbackend --skill auth-github-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GitHub OAuth authentication streamlines login for SuperBackend-based applications by handling the full OAuth 2.0 flow, including token management, account linking, and CSRF protection.

Core Features & Use Cases

  • OAuth Flow: Initiate, callback, and token refresh
  • Account Management: Auto-create users, link existing accounts
  • Token Management: JWT generation, GitHub token storage
  • Security: CSRF protection via state parameter
  • Configuration: Environment variables or global settings
  • Use Case: Seamless sign-in for developers leveraging GitHub identities

Quick Start

Initiate the GitHub OAuth flow by invoking the /api/auth/github endpoint to start authentication.

Frequently Asked Questions about auth-github-skill

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

FAQPage Schema
How do I implement GitHub OAuth authentication in an Express backend?

GitHub OAuth authentication in an Express backend is implemented by initiating the OAuth 2.0 flow, handling the callback, and managing JWT generation. This Skill automates the full flow including token management and CSRF protection for SuperBackend apps.

What do I need to configure to set up GitHub OAuth login?

To set up GitHub OAuth login, you need to configure your GitHub OAuth credentials, specifically a clientId and clientSecret. You must also set up a callback URL, with environment variables serving as a fallback for global settings.

How does token management work with GitHub OAuth and JWT?

Token management with GitHub OAuth and JWT involves generating JWTs for session handling and securely storing the GitHub access token. The system automatically refreshes tokens and handles account linking for existing users.

How is CSRF protection handled during the OAuth 2.0 flow?

CSRF protection during the OAuth 2.0 flow is handled using a state parameter. This parameter is passed during the initiation and verified at the callback endpoint to prevent cross-site request forgery attacks.

Can I automatically create users when they sign in with GitHub?

Yes, you can automatically create users when they sign in with GitHub. The authentication flow supports auto-creating new users and linking GitHub identities to existing accounts within your SuperBackend application.