
This emulator lets you test Google OAuth 2.0, OpenID Connect, Gmail, Calendar, and Drive integration without hitting real Google APIs. You get a local server that mimics authorization flows, token exchange, PKCE, and the major Google services. Seed it with test users, OAuth clients, calendar events, Gmail messages, and Drive files so your tests are repeatable. It works with google-auth-library, Auth.js, and Passport by pointing them at localhost instead of accounts.google.com. Honestly a lifesaver if you've ever burned through API quotas during development or needed to test edge cases like workspace domains without creating actual Google accounts. Supports strict client validation when you configure OAuth clients, otherwise accepts any client_id for quick prototyping.
- skills.sh installs
- 369
- GitHub stars
- 2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add vercel-labs/emulate --skill google --agent claude-codeInstalls into .claude/skills of the current project.
Files
Google OAuth 2.0 / OIDC + Gmail, Calendar & Drive Emulator
OAuth 2.0 and OpenID Connect emulation with authorization code flow, PKCE support, ID tokens, OIDC discovery, refresh tokens, plus Gmail, Google Calendar, and Google Drive REST API surfaces.
Start
Local listeners bind to 127.0.0.1 by default. For access from containers or other machines, pass --host 0.0.0.0 to the CLI or hostname: '0.0.0.0' to createEmulator. Configure --base-url or baseUrl for advertised URLs reachable by those clients.
# Google only
npx emulate --service google
# Default port
# http://localhost:4002
Or programmatically:
import { createEmulator } from 'emulate'
const google = await createEmulator({ service: 'google', port: 4002 })
// google.url === 'http://localhost:4002'
Pointing Your App at the Emulator
Environment Variable
GOOGLE_EMULATOR_URL=http://localhost:4002
OAuth URL Mapping
Sponsors
Details
- Repository
- github.com/vercel-labs/emulate
- Categories
- Backend & APIs, Testing & QA, Security, Sales & Marketing, Cloud & Infrastructure, Office & Documents, Finance & Trading
- First seen
- Jun 3, 2026