Skip to content

Supabase authentication not working in Windsurf #5914

@willy3087

Description

@willy3087

Problem Description

The Supabase authentication flow works correctly in VS Code but fails in Windsurf. The OAuth callback and token handling appear to complete successfully, but the extension does not properly authenticate in Windsurf.

Current Behavior

  1. User clicks login in Windsurf
  2. OAuth flow completes with GitHub
  3. Tokens are received by the extension
  4. Extension does not unlock/authenticate properly

Expected Behavior

The authentication should work identically in both VS Code and Windsurf, properly storing credentials and unlocking the extension.

Technical Details

  • URI scheme detection is working (windsurf:// vs vscode://)
  • OAuth callback receives tokens correctly
  • The issue appears to be in the credential storage or session handling
  • Related to PR Add copy prompt to history #56 (Supabase authentication migration)

Potential Causes

  1. Different secret storage behavior between VS Code and Windsurf
  2. Extension context differences
  3. URI handler registration differences
  4. Promise rejection in extension host (as noted in logs)

Investigation Steps

  1. Check if context.secrets API works differently in Windsurf
  2. Verify URI handler registration in Windsurf
  3. Debug the credential storage and retrieval process
  4. Check for any Windsurf-specific API differences

Related Code

  • /packages/cloud/src/SupabaseAuthService.ts - Main authentication service
  • /src/activate/handleUri.ts - URI callback handler
  • /packages/cloud/src/AuthService.ts - Legacy Clerk auth service (for comparison)

Workaround

Users can currently use VS Code for authentication until this issue is resolved.

Additional Context

This issue was discovered during the implementation of PR #56 which migrates authentication from Clerk to Supabase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions