Docs/IDE Integration & API/IDE Sign-in & Device Pairing

IDE Sign-in & Device Pairing

The CodePus IDE uses OAuth 2.0 Device Authorization Grant (RFC 8628). No password is entered into the IDE.

Flow

  • IDE: top-right β†’ Sign in
  • Client generates device_code + user_code
  • Browser opens https://codepus.ai/device, enter user_code
  • Web: confirm authorization
  • IDE auto-fetches access_token + refresh_token
  • Security

  • device_code valid 10 min
  • access_token valid 1h, auto rotated
  • Sign out revokes tokens server-side immediately
  • Sessions

    List signed-in devices: Device Authorization.

    Multi-account

    Command palette: CodePus: Switch Account. Local stores are isolated.

    Failures

  • device_code expired: re-trigger
  • Browser doesn't open: copy URL manually
  • Detailed: IDE Integration Troubleshooting