Sets up OAuth providers to work with portless local dev URLs by switching from rejected .localhost subdomains to valid TLDs like .dev or .app. Google and Apple are the main culprits here, they reject .localhost in redirect URIs even though they allow bare localhost. The skill walks through configuring Google, Apple, Microsoft, Facebook, and GitHub with the right callback URLs, plus how to set NEXTAUTH_URL and similar vars so your auth library constructs URLs correctly. If you've ever hit "redirect_uri_mismatch" during local OAuth testing, this is the fix. Includes a table showing exactly which providers block what, which is honestly useful reference material on its own.

skills.sh installs
3.1K
GitHub stars
12.9K
last updated
Aug 21, 2026

Install

$ npx -y skills add vercel-labs/portless --skill oauth --agent claude-code

Installs into .claude/skills of the current project.

Files

OAuth with Portless

OAuth providers validate redirect URIs against domain rules. .localhost subdomains fail on most providers because they are not in the Public Suffix List or are explicitly blocked. Portless fixes this with --tld to serve apps on real, valid domains.

The Problem

When portless uses the default .localhost TLD, OAuth providers reject redirect URIs like http://myapp.localhost:1355/callback:

Providerlocalhost.localhost subdomainsReason
GoogleAllowedRejectedNot in their bundled PSL
AppleRejectedRejectedNo localhost at all
MicrosoftAllowedAllowedPermissive localhost handling
FacebookAllowedVariesMust register each URI exactly
GitHubAllowedAllowedPermissive

Google and Apple are the strictest. Microsoft and GitHub are more lenient with localhost.

The Fix

Sponsors

Details

Repository
github.com/vercel-labs/portless
Categories
Security, Git & Pull Requests, Cloud & Infrastructure
First seen
May 16, 2026

More from vercel-labs/portless

All 3

Recommended

More Security
1elastic avatarcloud-network-securityelastic/agent-skillsManage Serverless network security (traffic filters): create, update, and delete IP filters and AWS PrivateLink VPC filters. Use when restricting network access2.8Kskills.sh installs
2mapbox avatarmapbox-token-securitymapbox/mapbox-agent-skillsSecurity best practices for Mapbox access tokens, including scope management, URL restrictions, rotation strategies, and protecting sensitive data. Use when cre2Kskills.sh installs
3github avatarmcp-security-auditgithub/awesome-copilotAudit MCP (Model Context Protocol) server configurations for security issues. Use this skill when: - Reviewing .mcp.json files for security risks - Checking MCP1.1Kskills.sh installs
4ruvnet avataragent-security-managerruvnet/rufloAgent skill for security-manager - invoke with $agent-security-manager1.1Kskills.sh installs
5ruvnet avataragent-v3-security-architectruvnet/rufloAgent skill for v3-security-architect - invoke with $agent-v3-security-architect1.1Kskills.sh installs
6aradotso avatarvibe-security-skillaradotso/security-skillsvibe security skill976skills.sh installs