
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.
$ npx -y skills add vercel-labs/emulate --skill google --agent claude-codeInstalls into .claude/skills of the current project.
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.
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'
GOOGLE_EMULATOR_URL=http://localhost:4002
Sponsors