Skip to content
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal fun WebViewLoginScreen(
) {
val state = rememberWebViewState(url)
LaunchedEffect(Unit) {
state.cookieManager.removeAllCookies()
state.webView?.nativeWebView?.clearAllCookies()
val urlData = Url(url)
val actualUrl =
urlData.protocol.name
Expand All @@ -27,7 +27,10 @@ internal fun WebViewLoginScreen(
.plus("/")
while (true) {
delay(2.seconds)
val cookies = state.nativeWebView.getCookiesForUrl(actualUrl)
val cookies =
state.webView?.nativeWebView
?.getCookiesForUrl(actualUrl)
.orEmpty()
if (callback.invoke(cookies.joinToString("; ") { "${it.name}=${it.value}" })) {
onBack.invoke()
break
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ clikt = "5.1.0"
collection = "1.5.0"
compileSdk = "36"
composemediaplayer = "0.8.7"
composewebview = "1.0.0-alpha-12"
composewebview = "1.0.0-alpha-13"
cryptographyProviderOptimal = "0.5.0"
jna = "5.18.1"
junique = "1.0.4"
Expand Down
Loading