async function fetchAccount()

in packages/app/src/account-provider.tsx [71:87]


    async function fetchAccount() {
      const resp = await fetch(tempOtt ? `/_/account?ott=${tempOtt}` : '/_/account');
      const json = await resp.json();
      if (json.authenticated) {
        setLogin(json.login);
        setAuthenticated(json.authenticated);
        setRegistryHref(json.registryHref);
      }
      if (json.ott) {
        setOtt(json.ott);
      }
      if (json.flash) {
        const flashObject = JSON.parse(json.flash);
        flash.set(flashObject.severity, flashObject.message);   
      }
      setLoading(false);
    }