function one_verif( url_redir ) {
   let verif = async function (token) {
      try {
          var resp = await axios.post(BASE_URL + '/one-api/v2/verif/do', 
          { token: token });
          if (resp.status != 200) {
              return {
                  status: "ERR",
                  message: resp.statusText
              };
          }
          let data = resp.data;
          return data;
      } catch (e) {
          return {
              status: "ERR",
              message: e.message
          };
      }
   }
  
   let x = async () => {
      try {
         let resp = await verif(window.one_token())
         if (resp.status != "OK") {
            window.localStorage.removeItem("token")
            window.localStorage.removeItem("user")
         } else {
            location.replace(url_redir)
         }
      } catch (e) {
      }
   }
   x()
   // window.location = urllogout
}
window.one_verif = one_verif
