fluttercommunity / fluttercommunity/flutter_webview_plugin
session cookie for cross domain websites
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 938
- PR merge metrics
- No merged PRs in 30d
Description
By getting the cookie through js, most websites will do cross-domain security processing, so it is basically impossible to get the value of the session, it makes no sense.
Changing the cookie method to the following implementation addresses this issue.
`void getAllCookies(MethodCall call, final MethodChannel.Result result){
String url = call.argument("url");
CookieManager cookieManager = CookieManager.getInstance();
String cookieStr = cookieManager.getCookie(url);
result.success(cookieStr);
}`
Currently making the change locally, will be great to have the fix built into the plugin. See this [article](https://www.programmersought.com/article/4084745977/) for a detailed implementation for iOS and Android.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.