Skip to content

fix: Enhance API key extraction in voice mode authentication flow #7859

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Cristhianzl
Copy link
Member

This pull request updates the authenticate_and_get_openai_key function in voice_mode.py to improve API key extraction logic and streamline user authentication. The changes focus on enhancing security and simplifying how API keys are retrieved from requests.

Authentication Improvements:

  • src/backend/base/langflow/api/v1/voice_mode.py: Added API_KEY_NAME to the imports and updated the authenticate_and_get_openai_key function to directly extract the API key from query parameters or headers, replacing the previous api_key_security usage. [1] [2]

…nd maintainability of code

🔧 (voice_mode.py): refactor authentication logic to extract API key from query parameters or headers directly for better security practices
@Cristhianzl Cristhianzl self-assigned this Apr 30, 2025
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 30, 2025
@github-actions github-actions bot added the bug Something isn't working label Apr 30, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Apr 30, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant