GitHub Copilot Auth Helper
AI-generatedSummary
Provide an interactive OAuth Device Flow helper that serves a user-friendly HTML page enabling end users to obtain GitHub Copilot access tokens without using a terminal, by proxying requests to GitHub's OAuth endpoints to avoid CORS issues.
Inputs
- clientId (required) — GitHub OAuth Client ID (typically the official VS Code client ID).
- scopes (required) — OAuth scopes required for GitHub Copilot (default: 'repo user:email').
Output shape
no body — success/failure only
This trigger node listens on a GET/POST webhook path and serves an HTML page for the OAuth device flow; it handles POST requests from the page to request and poll device codes from GitHub and returns the corresponding JSON. The token is obtained client-side in the browser via this interactive page and not output directly from the node.
Examples
Example 1: User wants to allow an end user to get a GitHub Copilot token visually without terminal or CORS errors.
Set the node's 'Client ID' and 'Scopes', activate the workflow, then share the webhook's Production URL with the user. The user opens this URL in a browser, follows on-screen steps to start authentication, copy the authorization code, authorize the app on GitHub, and finally receive and copy the access token. This token can be pasted into the 'GitHub Copilot API' credential in n8n.