fluttercommunity / fluttercommunity/flutter_webview_plugin

session cookie for cross domain websites

Open
#887 1 comment 2 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.