You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggestion: extend manageCookies from issue #1649 for web apps to the following behaviour:
When manageCookies is true, include withCredentials = true when making API requests.
I've checked the proposed fix (withCredentials=true) by modifying http package source to make
bool withCredentials = true;
and it does solve the issue. Browser stores the cookie, it appears in requests to the API.
hi @TheNoumanDev Ivan found an important issue with handling cookies from different domains that we should resolve. The http flutter package we use does not support it. So we either use a different package or enhance it a bit to support it.
expose a property withCredentials (default: false) in our API definition. Read that (if set) to set the value of withCredentials
expose an environment variable allowCrossDomainCookies. when set to true, it will automatically set withCredentials to true for all API calls. That way user doesn't have to remember to set it everytime.
Context: if a cookie is provided by the API requested from Ensemble, it is not stored by the browser.
Sample request and response headers are below (body does not matter).
Flutter web being run on port 9000.
FastAPI BE being run on port 8000.
Request headers:
Response headers:
Suggestion: extend manageCookies from issue #1649 for web apps to the following behaviour:
When manageCookies is true, include withCredentials = true when making API requests.
Plain JS example:
fetch('https://example.com/', {
credentials: 'include'
});
The text was updated successfully, but these errors were encountered: