I am targeting Android and Web/JS with compose multiplatform.
Android runs just fine, but when I try to run the web page with wasm, i get the
FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call initializeApp() error.
I am using Wasm to run the web page, if it's incompatible with this SDK, I would appreciate if anyone provided alternative methods to run kotlinJS. Thanks!
Here's the relevant code
in commonMain package:
import dev.gitlive.firebase.Firebase
import dev.gitlive.firebase.auth.auth
import org.koin.core.component.KoinComponent
class LoginApi : KoinComponent {
val auth = Firebase.auth
suspend fun registration(email: String, password: String): String{
val user = auth.createUserWithEmailAndPassword(email, password)
return user.user?.uid.toString()
}
}
in jsMain package, loginScreen just call the LoginViewModel and it's only method:
(this also uses webpack)
I am targeting Android and Web/JS with compose multiplatform.
Android runs just fine, but when I try to run the web page with wasm, i get the
FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call initializeApp()
error. I am using Wasm to run the web page, if it's incompatible with this SDK, I would appreciate if anyone provided alternative methods to run kotlinJS. Thanks!Here's the relevant code in commonMain package:
in jsMain package, loginScreen just call the LoginViewModel and it's only method: (this also uses
webpack
)