LineLoginResult
The outcome of LineLogin.login.
Modelled as a sealed type rather than an exception or a Result, because backing out of a login is not an error and should not be handled like one:
when (val result = LineLogin.login()) {
is LineLoginResult.Success -> signIn(result)
LineLoginResult.Cancelled -> Unit // the user changed their mind; say nothing
is LineLoginResult.Failure -> showError(result.message)
}Content copied to clipboard
Inheritors
Types
Link copied to clipboard
The user dismissed the LINE login screen, or a login already in flight was cancelled.
Link copied to clipboard
class Failure(val code: LineLoginErrorCode, val message: String, val rawCode: String? = null, val rawMessage: String? = null) : LineLoginResult
The login could not be completed.
Link copied to clipboard
class Success(val accessToken: LineAccessToken, val profile: LineProfile?, val idToken: LineIdToken?, val friendshipStatusChanged: Boolean, val nonce: String?) : LineLoginResult
The user signed in.