Skip to content

feat(agentflow): axios client includes cookies in requests#5919

Merged
ginna-baker merged 2 commits intomainfrom
agentflow-include-cookies-in-requests
Mar 6, 2026
Merged

feat(agentflow): axios client includes cookies in requests#5919
ginna-baker merged 2 commits intomainfrom
agentflow-include-cookies-in-requests

Conversation

@ginna-baker
Copy link
Collaborator

We need axios to include cookies in requests so that the server can authenticate.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the Axios client configuration to include cookies in requests. This change is crucial for enabling server-side authentication, as it allows the server to receive and process necessary credentials for secure communication.

Highlights

  • Axios Configuration: Enabled the withCredentials option in the Axios client configuration, ensuring that cookies are sent with cross-origin requests for proper server authentication.
Changelog
  • packages/agentflow/src/infrastructure/api/client.ts
    • Added withCredentials: true to the Axios client configuration.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds withCredentials: true to the axios client configuration to enable cookie-based authentication. While the change is functionally correct for its purpose, it lacks corresponding test coverage. My review includes a comment to add a test case, which will help ensure the change is robust and prevent future regressions.

baseURL: `${apiBaseUrl}/api/v1`,
headers
headers,
withCredentials: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change introduces withCredentials: true but lacks corresponding test coverage. To prevent future regressions, please add a test case to client.test.ts that verifies withCredentials: true is passed to axios.create.

@muratkaratekeli muratkaratekeli self-requested a review March 6, 2026 19:45
Copy link

@muratkaratekeli muratkaratekeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ginna-baker ginna-baker merged commit 73b0b15 into main Mar 6, 2026
7 checks passed
@jocelynlin-wd
Copy link
Contributor

Agentflow already accepts optional token to be used for APIs. This will introduce two auth mechanism running simultaneously

https://github.com/FlowiseAI/Flowise/blob/main/packages/agentflow/src/core/types/index.ts#L190
https://github.com/FlowiseAI/Flowise/blob/main/packages/agentflow/src/infrastructure/api/client.ts#L13

    if (token) {
        headers['Authorization'] = `Bearer ${token}`
    }

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

Successfully merging this pull request may close these issues.

3 participants