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

Cookie needs to set an expiration for compatibility with InAppBrowser #12

Open
batmanbury opened this issue Oct 23, 2020 · 0 comments
Open

Comments

@batmanbury
Copy link

batmanbury commented Oct 23, 2020

Re: apache/cordova-plugin-inappbrowser#509 (comment)

The linked issue from InAppBrowser explains: "In iOS cookies are not persistent once app is exited and restarted. This creates problem with hosted web app saving cookies or local storage."

And the linked issue comment itself is from a user who attempted to use cordova-plugin-wkwebview-cookie-sync but to no effect. I'm also using this plugin which has been working well, except that when exiting the app to the system browser, through InAppBrowser, the user is immediately logged out of the app, loses session/cookies, and returns to find the app landing/login screen, rather than where they originally exited from.

If cordova-plugin-wkwebview-cookie-sync could set an expiration, arbitrarily far into the future (e.g. "12/31/9999") it should solve this problem (re: apache/cordova-plugin-inappbrowser#509 (comment)).

"... By setting an explicit expiration date on the cookie returned by the server this causes the browser to treat it as persistent."

Could you advise on how to set the expiration? (Either hardcoded in the plugin, or as an argument when calling "injectCookie").

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

No branches or pull requests

1 participant