current Session state is found by either: when(i...
# supabase-kt
c
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
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
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
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
c
oooh. whats the rename going to be?
j
Will still be decided what the best move is for handling an expired session. Probably after https://github.com/supabase-community/supabase-kt/pull/1291