KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
366 stars 45 forks source link

Cookie issue #178

Open Osanosa opened 1 month ago

Osanosa commented 1 month ago

Hi there. I'm trying to show pop-up dialog with a page on some local crm site but after login upon reopening it prompts to log in again despite having all cookies saved. Google stays logged in and I can continue via it, and despite cookie being saved it doesn't properly open.

Osanosa commented 1 month ago

How can I troubleshoot it?

Osanosa commented 1 month ago

image image I'm trying to debug it to compare states but for some reason can't

KevinnZou commented 4 weeks ago

@Osanosa Could you please provide your code? We just need a simple example.

Osanosa commented 3 weeks ago

My code is pretty simple, rememberWebviewState(url) and WebView itself. As per mentioned can't debug state — it's possible to do until WebView is displayed, then it goes out of scope and state becomes unavailable. I checked /data/data and looks like while cookie doesn't change, session storage does (/data/data/pro.themed.mdvc/app_webview/Default/Session Storage) and it looks like this when authorized: *®Ë#version1 namespace-1ŽÑad next-map-id1Enamespace-877bc9de_971a_43e4_98d9_5d18ae80c675-https://mydrop.com.ua/0\ž®+map-0-gapi.sessionStorageTest

And this when unauthorized: *®Ë#version1 namespace-•—íd next-map-id1Enamespace-12f21a4d_e717_4a6f_822f_b55653b53edb-https://mydrop.com.ua/0\ž®+map-0-gapi.sessionStorageTest¦âê·f next-map-id2Gnamespace-12f21a4d_e717_4a6f_822f_b55653b53edb-https://www.youtube.com/1Û19KÍmap-1-5fea1c73-5e0c5471àF0hq4owVHwEWuv5y6+JchueQmecujswbPENniYKXt1xlUSLgyTx9RfvPObSusKKlXoCf2khQKTDiJv9g7+W2VgqfOkPfQzH4n/HD4vo+S4E34nelxV1V5f36lBYHiCvjY5OaZrOzVqsMwNh9R40TnDG42lF1YmSftyCOwxVP7qjE3L+Fmap-1-iU5q-!O9@$&1,5fea1c73-5e0c5471 map-1-__sak

As per example you can set up a simple WebView and log in via Google or auth link obtained from telegram bot, check values, then change uri and see what changes.

"https://mydrop.com.ua/vendor/orders"