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

Android SDK 31 iframe not save cookies #1417

Closed
W84Soft opened this issue Apr 13, 2022 · 4 comments
Closed

Android SDK 31 iframe not save cookies #1417

W84Soft opened this issue Apr 13, 2022 · 4 comments

Comments

@W84Soft
Copy link

W84Soft commented Apr 13, 2022

When I set targetSdkVersion to 31 my iframe not saving session cookies
<preference name="android-targetSdkVersion" value="31" />
When I change targetSdk to 30 everythings worked

@breautek
Copy link
Contributor

Starting in API 31 on Android 12 devices, Google has started enforcing SameSite policies for WebView cookies.

Cordova cannot override this policy.

Personally I don't use cookies so I'm not totally familiar with the SameSite policies but they have a guide that should be able to help. It may involve making changes to your server.

Closing as won't fix.

@monbutiong
Copy link

since the cookies and sessions are not working in to the iframe from targetSdk 31 and up, also it will not work on IOS app, I used window.open() to make a workaround solution.

@enricodente
Copy link

Same problem here, has anybody found a solution for this issue?

@nzionisf
Copy link

@enricodente you should add to your cookie the attribute SameSite=None (and "Secure" attribute if you don't have it yet)
you can read more here:
https://developer.android.com/about/versions/12/behavior-changes-12#samesite

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

5 participants