Add OAuth support for the forums

the current login page is only meant to act as a placeholder until our designer is back online
This commit is contained in:
red binder 2026-06-07 09:52:57 +02:00
commit 750b3d154c
7 changed files with 423 additions and 21 deletions

38
res/login.html Normal file
View file

@ -0,0 +1,38 @@
<!-- straight stole this from some random template website, will replace with the splatnet one later - binder -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login - SPFN</title>
<style>
body { font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #f4f4f9; }
.login-box { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 300px; }
h2 { margin-top: 0; color: #333; text-align: center; }
.input-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 5px; color: #666; }
input[type="text"], input[type="password"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 10px; background-color: #007bff; border: none; color: white; border-radius: 4px; cursor: pointer; font-size: 16px; }
button:hover { background-color: #0056b3; }
</style>
</head>
<body>
<div class="login-box">
<h2>Sign In</h2>
<form action="/api/v2/oauth2/authorize/submit" method="POST">
<input type="hidden" name="client_id" value="{{client_id}}">
<input type="hidden" name="redirect_uri" value="{{redirect_uri}}">
<input type="hidden" name="state" value="{{state}}">
<div class="input-group">
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
</div>
<div class="input-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">Authorize Application</button>
</form>
</div>
</body>
</html>