state

abstract val state: StateFlow<AuthState>

Where the session stands, now and on every change.

AuthState.Identified.User once authenticate has succeeded, AuthState.Unidentified before that, after clearSession, and if a session is ever lost for good.

A StateFlow, so reading state.value at startup tells you whether to authenticate or go straight to content. To be told the moment a session is lost rather than polling this, use SdkConfig.Builder.onSessionLost.