resumePendingLogin

The login LINE completed while your app was not running, or null when there is none.

The web needs this; Android and iOS return null. In a browser login is a full-page redirect: the page unloads, LINE authenticates, and the user comes back to a fresh app whose login() call no longer exists. configure hands the returning URL to LIFF, which completes the login and stores the tokens — but the result has nobody left to go to. This is where it goes.

Call it at startup, after configure, when your app has no session of its own:

LineLogin.configure(LineLoginConfig(channelId = "…", liffId = "…"))

val result = restoreMySession() ?: LineLogin.resumePendingLogin()

Skip it and the app shows its login screen again after a successful login — and pressing the button a second time appears to fix it, because the tokens were already there and pressing merely asked for them. That symptom is what this exists to remove.

Never presents UI and never redirects: it either has a completed login to hand over or it does not. A LineLoginResult.Failure is never returned — a startup call the user did not ask for has no business reporting errors, so an initialisation that failed reads as null and the error surfaces from the login the user goes on to attempt.

On Android and iOS this is always null, deliberately, because nothing is ever pending there: those logins resume the coroutine that started them. The reason for not reporting a stored session instead differs by platform, and only one of them is a limitation — on Android the SDK exposes the access token but never the ID token outside a login result, so a Success would have to omit the one field a backend verifies; on iOS the token store does keep the raw ID token, and the null is a choice: a session persisted from some earlier launch is not a login performed on this one, and an app that wants it can ask isLoggedIn and say so itself.