usernamePasswordLogin

abstract fun usernamePasswordLogin(username: String, password: String, callback: (Result<Unit>) -> Unit): Cancelable

Support function to login the user with direct username (usually a username or email) and password.

Note: The purpose of this function is to support clients that can not use Coroutines or the Kotlin programming language!

Since

1.10.0

Return

Cancelable It is your responsibility to cancel this operation, when no longer needed, to avoid memory leaks.

Parameters

username

a username or email

password

a password

callback

receiving the Result

abstract fun usernamePasswordLogin(username: String, password: String, lifecycleOwner: LifecycleOwner, callback: (Result<Unit>) -> Unit): Cancelable

Support function to login the user with direct username (usually a username or email) and password.

Note: The purpose of this function is to support clients that can not use Coroutines or the Kotlin programming language!

Since

1.10.0

Return

Cancelable In case you want to cancel before Lifecycle.State.DESTROYED.

Parameters

username

a username or email

password

a password

lifecycleOwner

auto cancel the Cancelable when lifecycle state is Lifecycle.State.DESTROYED.

callback

receiving the Result