Skip to content

Feature Request: Enable OAuth Flows in WebContainers for Secure Provider Authentication #1639

@codewithtyler

Description

@codewithtyler

Is your feature request related to a problem? Please describe:

When developing applications with OAuth authentication in Bolt, developers currently cannot test real OAuth flows due to security restrictions in WebContainers. This forces the use of mock data during development, creating a disconnect between development and production environments.

Describe the solution you'd like:

Implement a secure proxy system in WebContainers that would:

  1. Allow whitelisted OAuth providers (GitHub, Google, etc.) to securely communicate with applications running in WebContainers
  2. Handle the OAuth flow through a secure bridge between the WebContainer and the host browser
  3. Maintain WebContainer isolation while allowing authenticated API requests to these providers
  4. Support common OAuth flows including PKCE
  5. Provide a consistent developer experience that matches production behavior

The implementation would:

  1. Use a secure proxy to handle OAuth redirects and token exchange
  2. Maintain WebContainer security boundaries
  3. Only allow communication with verified OAuth providers
  4. Handle token storage securely within the WebContainers environment

Describe alternatives you've considered:

  1. Current approach: Using mock data during development
  2. Custom OAuth simulation: Creating a fake OAuth provider within WebContainers
  3. Disabling security restrictions: Not viable as it would compromise WebContainers security model

Additional context:

This feature would significantly improve the development experience by:

  • Allowing real OAuth testing in development
  • Maintaining security while enabling OAuth flows
  • Providing a more production-like environment
  • Supporting common authentication patterns
  • Enabling better testing of OAuth-dependent features

The secure proxy approach balances security needs with developer experience, making it an ideal solution for this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions