Skip to main content
The ofauth-v2-to-v3-migration skill teaches a coding agent (Claude Code, Codex, Cursor, or any Agent Skills-compatible client) how to move your codebase from OFAuth V2 to V3. It follows the V2 to V3 migration guide and the current V3 API reference. The skill updates your application code only. You still run the organization cutover in the OFAuth dashboard.

What the agent does

  1. Audits V2 usage. Searches for API keys (sk_live_..., sk_sandbox_...), /v2/* routes and the raw access proxy, x-connection-id, Link embed and /v2/link/init, /v2/account*, /v2/vault-plus, V2 SDKs, and webhook receivers reading svix-* headers.
  2. Plans the migration. Maps each V2 call to its V3 operation and required read/write scope, flags removed V2 features, and shows you the plan before making large edits.
  3. Rewrites the integration. Implements OAuth 2.0 + S256 PKCE at https://link.ofauth.com/v3/authorize, token exchange at https://api.ofauth.com/v3/link/token, stable refresh-token storage per linked_account_id, /v3/access/* with x-linked-account-id, /v3/vault-plus/*, /v3/linked-accounts, Standard Webhooks headers (webhook-*), V3 lifecycle events, and SSE Realtime where used.
  4. Builds the account bundle import. Creates an idempotent import script for the post-cutover ofauth.migrated-accounts.v1 JSON bundle.
  5. Verifies. Runs your test suite, checks that no V2 calls remain, and walks you through Test rehearsal and cutover day.

Install the skill

Run the install command from your repository root (on Windows, use Git Bash or WSL):
To install globally for every project, set dir=~/.claude/skills/ofauth-v2-to-v3-migration.

Start the migration

Open your coding agent in the repository and paste:
Steps only you should run:
  • Run the organization migration in the OFAuth dashboard, review Live callbacks, and save the Live client secret.
  • Configure your Sandbox, Test, and Live client IDs, client secrets, and webhook secret in your secret manager.
  • Run the Test rehearsal and verify Live client credentials.
  • After cutover, download the one-time account bundle and run the import script yourself.

Safety

The account bundle holds one refresh token for each migrated account. Treat it like your client secret: never commit it, paste it into an agent chat, or share it. Run the import yourself, then delete the file. If you lose it, an owner can regenerate it, which revokes every token from the previous bundle.
  • Review every diff before merging, especially token storage, the OAuth callback, and webhook verification.
  • Keep secrets in your secret manager or environment variables — never in code, fixtures, or prompts.
  • If your app uses a V2 route with no V3 operation, or a raw proxy path, contact support@ofauth.com before scheduling cutover.