|
|
|
@ -5,23 +5,7 @@ |
|
|
|
<title>Login</title> |
|
|
|
<title>Login</title> |
|
|
|
</head> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<body> |
|
|
|
<script> |
|
|
|
<script async src="https://telegram.org/js/telegram-widget.js?21" data-telegram-login="PAOV_Tea_bot" data-size="large" |
|
|
|
function onAuth(user){ |
|
|
|
data-auth-url="https://tea.paov.ru/auth/complete/telegram" data-request-access="write"></script> |
|
|
|
window.alert('aaaaa') |
|
|
|
|
|
|
|
const url = new URL('https://tea.paov.ru/auth/complete/telegram') |
|
|
|
|
|
|
|
url.searchParams.append('id',user.id) |
|
|
|
|
|
|
|
url.searchParams.append('first_name',user.first_name) |
|
|
|
|
|
|
|
url.searchParams.append('last_name',user.last_name) |
|
|
|
|
|
|
|
url.searchParams.append('username',user.username) |
|
|
|
|
|
|
|
url.searchParams.append('photo_url',user.photo_url) |
|
|
|
|
|
|
|
url.searchParams.append('auth_date',user.auth_date) |
|
|
|
|
|
|
|
url.searchParams.append('hash',user.hash) |
|
|
|
|
|
|
|
window.location.replace(url.href) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<script async data-telegram-login="PAOV_Tea_bot" data-size="large" |
|
|
|
|
|
|
|
data-onauth="setTimeout(onAuth(user), 2000)" data-request-access="write" |
|
|
|
|
|
|
|
src="https://telegram.org/js/telegram-widget.js?21"></script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
</html> |