KevinnZou/compose-webview-multiplatform

Allow using custom cookie manager

TelephoneTan opened this issue · 3 comments

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

@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.

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.