AuthenticationChange
interface AuthenticationChange
This sealed class describe the possible events that can be observed on the Flow created by calling App.authenticationChangeAsFlow.
The specific states are represented by these subclasses LoggedIn, LoggedOut and Removed.
Changes can thus be consumed this way:
app.authenticationChangeAsFlow().collect { change: AuthenticationChange ->
when(change) {
is LoggedIn -> handleLogin(change.user)
is LoggedOut -> handleLogOut(change.user)
is Removed -> handleRemove(change.user)
}
}
Content copied to clipboard