A set of Compose components to make it easier to use firebase in the composable world
A jetpack compose module to deal with firebase authentication
The library is available via MavenCentral:
allprojects {
repositories {
// ...
mavenCentral()
}
}
Add it to your module dependencies:
dependencies {
implementation("se.warting.firebase-compose:auth:<latest_version>")
}
Snapshots of the development version are available in Sonatype's snapshots repository.
allprojects {
repositories {
// ...
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
}
All you need to do is to call FirebaseComposeAuth
:
FirebaseComposeAuth(
loggedInContent = { LoggedIn() },
loggedOutContent = { LoggedOut() }
)
For a full implementation see: Full sample
You must install and initiate firebase in your app before using this