From 0dbd374f4648a4d07c611772a77eefe682463e64 Mon Sep 17 00:00:00 2001 From: ulfrxdev Date: Tue, 28 Apr 2026 13:49:14 +0200 Subject: [PATCH] feat(02-03): add Wasm auth stubs - Keep Wasm OIDC behind explicit v2 NotImplementedError boundaries - Add non-persistent Wasm AuthState store actual so the target compiles --- .../dev/ulfrx/recipe/auth/OidcClient.wasmJs.kt | 17 +++++++++++++++++ .../recipe/auth/SecureAuthStateStore.wasmJs.kt | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/OidcClient.wasmJs.kt create mode 100644 composeApp/src/webMain/kotlin/dev/ulfrx/recipe/auth/SecureAuthStateStore.wasmJs.kt 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 + } +}