Use WKProcessPool for cookies to allow for sane sign-in behavior across tabs

RESOLVED FIXED

Status

()

Firefox for iOS
General
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: bnicholson, Assigned: st3fan)

Tracking

unspecified
All
iOS 8

Firefox Tracking Flags

(fennec+)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
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.
(Reporter)

Updated

3 years ago
tracking-fennec: ? → +
There's some sample code here for creating a singleton process pool for this exact reason:

http://atmarkplant.com/ios-wkwebview-tips/
(Assignee)

Updated

3 years ago
Assignee: nobody → sarentz
(Assignee)

Comment 2

3 years ago
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)
(Assignee)

Comment 3

3 years ago
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+
(Assignee)

Updated

3 years ago
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.