Currently, if you open a Gmail tab and sign in, then open a new Gmail tab, you won't be signed in immediately. After waiting a few seconds and refreshing, you are signed in. This likely happens because the cookies are currently managed in each WKWebView process, so changes aren't propagated immediately. Using a WKProcessPool should fix this.
There's some sample code here for creating a singleton process pool for this exact reason: http://atmarkplant.com/ios-wkwebview-tips/
Created attachment 8594850 [details] [review] PR: https://github.com/mozilla/firefox-ios/pull/353 This patch lets the TabManager manage a global WKWebViewConfiguration with a single WKProcessPool. All tabs that do not explicitly specify a custom WKWebViewConfiguration when created will use this shared one. We only have one TabManager instance in the application, which is why I decided to put this logic here.
Attachment #8594850 - Flags: review?(wjohnston)
Good test case: Try this, with and without this patch: 1) Open a new tab 2) Login to news.ycombinator.com (or any site) 3) Open a new tab 4) See that you are logged in The last step fails without this patch.
Summary: Use WKProcessPool for cookies → Use WKProcessPool for cookies to allow for sane sign-in behavior across tabs
Comment on attachment 8594850 [details] [review] PR: https://github.com/mozilla/firefox-ios/pull/353 I'm a little nervous about sharing a configuration, but I don't see anything in it that we wouldn't want shared, so maybe its fine...
Attachment #8594850 - Flags: review?(wjohnston) → review+
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.