beatrun-courses-server-docker/views/key.ejs
2024-08-29 09:48:27 +05:00

104 lines
3.7 KiB
Text

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>beatrun.ru | Auth</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer">
<style>
body::-webkit-scrollbar {
width: 0 !important
}
body {
overflow: -moz-scrollbars-none;
}
body {
-ms-overflow-style: none;
}
</style>
</head>
<body class="w-screen font-mono">
<% include ../components/navbar.html %>
<div class="hero min-h-screen bg-base-200">
<div class="hero-content text-center">
<div class="text-center align-top w-full">
<div class="text-5xl font-bold font-mono mb-2">Authentication</div>
<div class="text-lg font-mono mb-4">Create your own API key here!</div>
<% if (!user) { %>
<div class="pt-5 text-base font-mono text-left">
<p>In order to receive your API Key, you must authorize with your Steam account. By doing so, you agree to follow these rules:</p>
<ul class="menu bg-base-200 rounded-box">
<li><a>1. Don't share your API Key with anyone (using it on different accounts, but on the same network is allowed).</a></li>
<li><a>2. Don't post courses with offensive content (name, map, block placement, whatever).</a></li>
<li><a>3. Don't upload garbage courses with intent to spam.</a></li>
</ul>
<p>Failure to obide by these rules will result in your API Key and SteamID being blacklisted.</p><br>
<p>As for us, we promise to:</p>
<ul class="menu bg-base-200 rounded-box">
<li><a>1. Never disclose a person's location, IP or any other private data they might share with us in the future.</a></li>
<li><a>2. Store only the necessary data: Last 2 used IPs, SteamID and Steam Username</a></li>
</ul>
</div>
<div class="pt-5 flex justify-center">
<a class="btn btn-primary hover:bg-red-700 justify-center" href="/auth">
Log-in with Steam
</a>
</div>
<% } else { %>
<div class="pt-5 font-mono text-left">
Great! Welcome to our little community.
<br>
<b>To get started, make sure you're using <a class="link link-warning text-red-700 hover:text-red-500" target="_blank" href="https://github.com/JonnyBro/beatrun">this</a> version of Beatrun!</b>
<br><br>
<div class="font-mono text-left">
<strong>Your authkey is:</strong>
<div class="tooltip" data-tip="Click To Copy">
<a class="hover:text-red-700" href="#" onclick="event.preventDefault(); navigator.clipboard.writeText(this.innerText)">
<%- user.authKey %>
</a>
</div>
</div>
<br>
Use this command below in console to save your API key in-game:
<br>
<div class="tooltip tooltip-right" data-tip="Click To Copy">
<a class="hover:text-red-700" href="#" onclick="event.preventDefault(); navigator.clipboard.writeText(this.innerText)">
<strong>Beatrun_Apikey <%- user.authKey %></strong>
</a>
</div>
<br>
And you're done!
<br><br>
You can now load any course you want, as seen on the main page!
<br>
<strong>Beatrun_LoadCode ABCD-1234-XYZX</strong>
<br><br>
<strong>Have fun!</strong>
</div>
<div class="pt-5 flex justify-center">
<a class="btn btn-primary hover:bg-red-700" href="/auth/logout">
Logout
</a>
</div>
<% } %>
</div>
</div>
</div>
<% include ../components/footer.html %>
</body>
</html>