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)
}
}

Properties

user
Link copied to clipboard
abstract val user: User

A reference to the User this event happened to.

Inheritors

LoggedIn
Link copied to clipboard
LoggedOut
Link copied to clipboard
Removed
Link copied to clipboard