onAuthStateChange
//fluxbase-kotlin/io.github.nimbleflux.fluxbase.auth/FluxbaseAuth/onAuthStateChange
onAuthStateChange
Section titled “onAuthStateChange”[jvm]
fun onAuthStateChange(callback: (AuthState) -> Unit): () -> Unit
Register a callback for auth state changes. Returns a function to unsubscribe.
Kotlin-native equivalent of the TS onAuthStateChange(callback). For coroutine-native consumption, wrap this in a callbackFlow.