Skip to content
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

Receiving Cookies in WebView #9

Closed
r-wittmann opened this issue Aug 17, 2017 · 10 comments
Closed

Receiving Cookies in WebView #9

r-wittmann opened this issue Aug 17, 2017 · 10 comments

Comments

@r-wittmann
Copy link

I was wondering, if it is possible to get data from cookies, set in the web view, to the flutter application. My use case is a custom auth mechanism which works by authentication with google on server side and sending a cookie with the client credentials in a cookie to the frontend (in this case my flutter app). Is this possible with this plugin?

I saw both #7 and #8 and am not sure about this approach because of the cookie instead of a redirect url and query parameters.

@lejard-h
Copy link
Collaborator

Not possible for now, but it is possible to get cookies from webView on Android so we could manage share cookies from webview with the flutter side.

On iOS I don't know yet.

@chances
Copy link

chances commented Oct 24, 2017

@lejard-h For iOS, It seem's an app's cookies are stored in their own cookie jar:

NSHTTPCookie *cookie;
NSHTTPCookieStorage *cookieJar = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [cookieJar cookies]) {
   NSLog(@"%@", cookie);
}

(From StackOverflow)

Not sure how outdated/accurate that answer is, though.

@marwan-at-work
Copy link

this would be very helpful

@lejard-h
Copy link
Collaborator

Future<Map<String, dynamic>> getCookies() for the next release 0.0.10,
also via eval function
final cookiesString = await evalJavascript("document.cookie");

@marwan-at-work
Copy link

@lejard-h is there a roadmap for the release i can follow up with? tks!

@lucaslcode
Copy link

@marwan-at-work I'm interested in this too, looks like it's already been released in 0.0.10 (check the code)

@marwan-at-work
Copy link

@lejard-h
Copy link
Collaborator

Not on pub yet, the release is blocked by #22 and #21, but if you are not concern by those issues, you can use the package directly from github and I am open to any contribution especially for iOS.

@bvedam
Copy link

bvedam commented Jan 17, 2019

Any update on ability to set cookies in webview for both Android and iOS? If not, is it the plan in the near term? Appreciate your response. Thx.

@BRO3886
Copy link

BRO3886 commented Feb 23, 2020

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants