message: check sessions state as well
diff: @@ -26,6 +26,7 @@ import {
  import {
  ApiRef,
  SessionApi,
  + SessionState,
  ProfileInfoApi,
  ProfileInfo,
  useApi,
  @@ -48,12 +49,18 @@ export const ProviderSettingsItem = (props: {
  useEffect(() => {
  let didCancel = false;
  - const subscription = api.sessionState$().subscribe(() => {
  + const subscription = api
  + .sessionState$()
  + .subscribe((sessionState: SessionState) => {
  if (!didCancel) {
  api
  .getProfile({ optional: true })
  .then((profile: ProfileInfo | undefined) => {
  + if (sessionState === SessionState.SignedIn) {
  + setSignedIn(true);
  + } else {
  setSignedIn(profile !== undefined);
  + }
  setProfileEmail(profile?.email ?? '');
  });
  }
  