diff --git a/composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/OidcClient.wasmJs.kt b/composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/OidcClient.wasmJs.kt new file mode 100644 index 0000000..e200a42 --- /dev/null +++ b/composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/OidcClient.wasmJs.kt @@ -0,0 +1,17 @@ +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") + +package dev.ulfrx.recipe.auth + +actual class OidcClient { + actual suspend fun login(): OidcResult { + throw NotImplementedError("Wasm OIDC: v2") + } + + actual suspend fun refresh(authStateJson: String): OidcResult { + throw NotImplementedError("Wasm OIDC: v2") + } + + actual suspend fun logout(authStateJson: String) { + throw NotImplementedError("Wasm OIDC: v2") + } +} diff --git a/composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/SecureAuthStateStore.wasmJs.kt b/composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/SecureAuthStateStore.wasmJs.kt new file mode 100644 index 0000000..5735178 --- /dev/null +++ b/composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/SecureAuthStateStore.wasmJs.kt @@ -0,0 +1,17 @@ +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") + +package dev.ulfrx.recipe.auth + +actual class SecureAuthStateStore { + private var authStateJson: String? = null + + actual fun read(): String? = authStateJson + + actual fun write(authStateJson: String) { + this.authStateJson = authStateJson + } + + actual fun clear() { + authStateJson = null + } +}