Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codewithtyler opened this issue Nov 28, 2024 · 0 comments

Comments

@codewithtyler
Copy link

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.

@codewithtyler codewithtyler changed the title Feature Request; Enable OAuth Flows in WebContainers for Secure Provider Authentication Feature Request: Enable OAuth Flows in WebContainers for Secure Provider Authentication Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant