telegram-oauth/html/login.jinja

40 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2024-01-14 08:04:25 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css"
integrity="sha512-b2QcS5SsA8tZodcDtGRELiGv5SaKSk1vDHDaQRda0htPYWZ6046lr3kJ5bAAQdpV2mmA/4v0wQF9MyU6/pDIAg=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
<style>
.main {
text-align: center;
background-color: #fff;
border-radius: 20px;
width: 260px;
height: 20px;
margin: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
</head>
<body>
<div class="main">
<script async src="https://telegram.org/js/telegram-widget.js?22"
data-telegram-login="{{ username }}"
data-size="large"
data-auth-url="{{ callback_url }}"
data-request-access="write">
</script>
<div>
<a href="https://t.me/{{ username }}?start=login">
<button type="button" class="btn btn-primary">通过 BOT 登录</button>
</a>
</div>
</div>
</body>
</html>