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

Incognito mode clearing out cookies for non-incognito mode instance also #511

Closed
5 tasks done
shimorojune opened this issue Sep 7, 2020 · 3 comments
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@shimorojune
Copy link

Environment

Technology Version
Flutter version 1.21.0-9.2.pre • channel beta
Plugin version 4.0.0+4
Android version 8.0.0
iOS version NA
Xcode version NA

Device information: Samsung S9+

Description

Expected behavior:
When there two instances of flutter_inappwebview in an application, and if one instance is set to incognito: true, it should clear the cookie store for that instance only and not affect the cookies for the other instance.

Current behavior:
When an application containing two instances of flutter_inappwebview have been created, with one having incognito: true, the incognito instance is also having access to the cookies of the normal instance, which defeats the purpose of incognito.

Also, if the app is removed from memory and launched again, the presence of the incognito instance clears the cookies store, thus logging us out of OAuth systems such as Google sign in.

Bug demo git repo

Steps to reproduce

  1. Clone the repository to local system and run the application.
  2. The upper webview instance is incognito:false, while the lower instance is incognito:true
  3. Log into medium.com using your google OAuth in the upper instance.
  4. Once login has been complete, and the home feed is visible, close the app, and clear it from memory using the android bottom navigation Recents button.
  5. Reopen the application.
  6. The logged in instance of the webview will also be logged out, which should not occur. (this behavior does not occur when the incognito instance is not present)
@shimorojune shimorojune added the bug Something isn't working label Sep 7, 2020
@pichillilorenzo
Copy link
Owner

Unfortunately, on Android, by setting this option to true, it will clear all the cookies of all WebView instances, because there isn't any way to make the website data store non-persistent for the specific WebView instance such as on iOS.

So, it is not possible to clear the cookies only for the specific WebView on Android. There is no official API to do it.

I will update also the incognito option docs just to make it more clear.

@shimorojune
Copy link
Author

That is quite unfortunate.

But still, amazing work with the plugin. Lot's of sweet features!
Thanks anyway 👍👍

Copy link

github-actions bot commented Nov 9, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants