KevinnZou / compose-webview-multiplatform

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

Allow using custom cookie manager #202

Open TelephoneTan opened 1 month ago

TelephoneTan commented 1 month ago

I need to use one single cookie manager for both kotlin http code and webview in purpose of sharing cookies between them, so I need to set the cookie manager for WebViewState

KevinnZou commented 1 month ago

@TelephoneTan Thanks for your suggestions! Could you please provide an example of how you plan to use this feature in your code? I'm concerned that simply changing val to var may not be sufficient.

TelephoneTan commented 1 month ago

Spider, I made a spider client, using kotlin ktor client to automatically do login steps for user. After these steps, all cookies remain in the ktor cookie jar, and if I can set this cookie jar to the newly created WebView, the user can open the website ad reuse the cookies.