Repository navigation
Expand file tree
/
Copy pathoauth-simple.html
More file actions
49 lines (44 loc) · 1.93 KB
/
Copy pathoauth-simple.html
File metadata and controls
49 lines (44 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<title>ShieldGate OAuth Test</title>
<style>
body { font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; }
.box { background: #f5f5f5; padding: 20px; border-radius: 8px; margin: 20px 0; }
.url { background: #e8f4f8; padding: 15px; font-family: monospace; word-break: break-all; }
.button { background: #007cba; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; }
.creds { background: #d4edda; padding: 15px; border-radius: 5px; }
</style>
</head>
<body>
<h1>🛡️ ShieldGate OAuth Test</h1>
<div class="box">
<h3>OAuth Login URL:</h3>
<div class="url" id="oauthUrl">
http://localhost:8080/oauth/authorize?response_type=code&client_id=test-client-123&redirect_uri=http://localhost:3000/callback&scope=openid%20profile%20email&state=xyz123&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256
</div>
<br>
<a href="#" class="button" onclick="openOAuth()">🚀 Open OAuth Login</a>
<button class="button" onclick="copyUrl()">📋 Copy URL</button>
</div>
<div class="creds">
<h3>Test Login:</h3>
<strong>Email:</strong> test@example.com<br>
<strong>Password:</strong> password123
</div>
<div class="box">
<h3>Nếu không truy cập được localhost:8080:</h3>
<p>1. Chạy: <code>docker inspect shieldgate-auth-server | findstr "IPAddress"</code></p>
<p>2. Thay "localhost" bằng IP container</p>
</div>
<script>
function openOAuth() {
window.open(document.getElementById('oauthUrl').textContent.trim(), '_blank');
}
function copyUrl() {
navigator.clipboard.writeText(document.getElementById('oauthUrl').textContent.trim());
alert('Copied!');
}
</script>
</body>
</html>