current Session state is found by either:
when(it) {
is SessionStatus.Authenticated ->
SessionStatus.Initializing ->
is SessionStatus.RefreshFailure ->
is SessionStatus.NotAuthenticated ->
}
authd, initing, and notAuthd make sense as state. RefreshFailure could very well be an event instead of state, no?
j
Jan
05/24/2026, 7:52 AM
Yes and no, currently this status appears if the session expired and refreshing failed. So the session can't be used during that time, but you are also not unauthenticated
👍 1
c
Colton Idle
05/24/2026, 8:50 AM
so. i guess it was a concious decision to add this as a separate state. i guess i was sorta curious why not just have it be NotAuthenticated in that case. instead of creating a new state for refreshFailure.
maybe more importantly. was there any inspiration for this? like are these 4 states pretty much the gold standard for auth?
j
Jan
05/25/2026, 8:27 AM
I think it might lead to confusion if merged into one, in any case the state is getting renamed in the future as the current name is still a renmant of the old system