SSO / app /templates /index.html
Hammad712's picture
Added SSO Backend Functionality
8393a26
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FastAPI Microsoft SSO</title>
<style>
body { font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f4f4f4; }
.container { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-align: center; }
.btn { display: inline-block; padding: 10px 20px; background-color: #0078d4; color: white; text-decoration: none; border-radius: 4px; font-weight: bold; }
.btn-logout { background-color: #d83b01; }
pre { background: #eee; padding: 10px; text-align: left; overflow-x: auto; }
</style>
</head>
<body>
<div class="container">
<h1>Microsoft SSO Integration</h1>
{% if user %}
<p>Welcome, <strong>{{ user.name or user.email }}</strong>!</p>
<div style="text-align: left; margin-bottom: 20px;">
<small>User Details:</small>
<pre>{{ user | tojson(indent=2) }}</pre>
</div>
<a href="/auth/logout" class="btn btn-logout">Logout</a>
{% else %}
<p>You are not logged in.</p>
<a href="/auth/login" class="btn">Login with Microsoft</a>
{% endif %}
</div>
</body>
</html>