let tokenPageOrigin = "https://www.aisttm.ru:443/yandexid/oauth.php";let oauthQueryParams = {client_id: "922a98953908416cac73128fc2dfa8d5", response_type: "token",redirect_uri: "https://www.aisttm.ru:443/yandexid/oauth.php"};function authorizationUser(o){console.log(o);let t="/yandexid/auth.php";fetch(t=t+"?action=ajax_authorization_user&access_token="+o,{method:"GET",headers:{"Content-Type":"application/json"}}).then(o=>o.json()).then(o=>{console.log(o),!1==o.error&&(window.location.href="/")}).catch(o=>console.log("error",o))}let suggestParams = {"view":"button","parentId":"zal","buttonView":"main","buttonTheme":"dark","buttonSize":"xs","buttonBorderRadius":"4"};window.YaAuthSuggest.init(oauthQueryParams,tokenPageOrigin,suggestParams).then(function(n){return n.handler()}).then(function(n){authorizationUser(n.access_token),console.log("Сообщение с токеном: ",n)}).catch(function(n){console.log("Что-то пошло не так: ",n)});})