Search code examples
firebasekotlinfirebase-authenticationkotlin-multiplatform

Is there a way to use Firebase (Authentication) with Kotlin Multiplatform?


I have a project which uses Firebase Authentication in Android. It works well and I want to port the same project to an iOS App using code sharing with Kotlin Multiplatform.

I initially thought I could simple create a

expect class FirebaseAuth

and

//AndroidMain
actual class FirebaseAuth

//iOSMain
actual class FirebaseAuth

But I don't really know how I could use the iOS version of FirebaseAuth in iOSMain? Can someone guide me here?


Solution

  • From now on there is a new official library about Kotlin Multiplatform firebase products. Supported platforms are Android, iOS and JavaScript.

    https://firebaseopensource.com/projects/gitliveapp/firebase-kotlin-sdk/