oauth

Configure OAuth redirect URIs for portless local development domains.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/mynameistito/opencode-config --skill oauth-mynameistito
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oauth
Source: https://github.com/mynameistito/opencode-config/tree/main/skills/oauth
Command: npx skills add https://github.com/mynameistito/opencode-config --skill oauth-mynameistito

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OAuth providers reject redirect URIs using .localhost subdomains during local development, causing "redirect_uri_mismatch" and sign-in failures across common platforms like Google and Apple.

Core Features & Use Cases

  • Cross-provider OAuth configuration: Step-by-step setup guides for Google, Apple, Microsoft, Facebook, and GitHub OAuth providers to work with portless local dev domains.
  • Error resolution: Fixes common "redirect_uri_mismatch", "invalid redirect URI", and local sign-in failures caused by .localhost TLD restrictions.
  • Auth library integration: Includes configuration instructions for NextAuth, Passport.js, and custom auth setups to use portless domains correctly. Use case example: If you're building a Next.js app with Google Sign-In and get a redirect URI mismatch error when running locally with portless, this skill walks you through configuring both the Google Cloud Console and your NextAuth settings to resolve the issue.

Quick Start

Use the oauth skill to configure Google OAuth redirect URIs for your local portless dev environment and fix the redirect_uri_mismatch error you're seeing when testing sign-in.

Frequently Asked Questions about oauth

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

FAQPage Schema
Why does Google OAuth throw a redirect_uri_mismatch error during local development?

Google OAuth throws a redirect_uri_mismatch error because OAuth providers reject redirect URIs using .localhost subdomains. You can resolve this by configuring a portless custom TLD and updating your Google Cloud Console redirect URIs.

How do I configure NextAuth to use a portless local domain for OAuth?

To configure NextAuth with a portless local domain, update your environment variables to point auth callback URLs to the custom TLD. Ensure your HTTPS proxy setup and OAuth provider console match the exact redirect URI string.

Does Apple Sign In work with custom local development domains instead of .localhost?

Yes, Apple Sign In works with custom local development domains when configured correctly. You must select a valid Public Suffix List TLD and set up an HTTPS proxy to meet Apple's strict redirect URI validation requirements.

What's the best way to fix invalid redirect URI errors for Passport.js in local dev?

The best way to fix invalid redirect URI errors for Passport.js is to switch from default .localhost subdomains to a portless custom TLD. Update your Passport.js callback configuration and OAuth provider settings to match.

Do I need an HTTPS proxy to run Facebook OAuth on a portless local environment?

Yes, you need an HTTPS proxy to run Facebook OAuth on a portless local environment. Setting up the HTTPS proxy ensures your custom TLD meets Facebook's secure redirect URI validation requirements during local development.

Can I use Microsoft OAuth with portless local dev domains?

Yes, you can use Microsoft OAuth with portless local dev domains. You must configure the redirect URI in the Microsoft OAuth provider console and ensure your local environment uses a valid Public Suffix List TLD.