onSessionLost

fun onSessionLost(onSessionLost: () -> Unit): SdkConfig.Builder

Called when the session is lost for good and cannot be refreshed — a revoked token, an account closed on your side.

At that point CgsAuth.state has gone back to Unidentified and content requests will fail until a new session is opened. Get a fresh token from your backend and call CgsAuth.authenticate again.

It is invoked on the main thread, so it can navigate or touch UI directly, and it fires once per lost session rather than once per failed request.

Return

this builder.

Parameters

onSessionLost

what to run when the session is lost.