Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,8 +30,20 @@ google = oauth.register(
|
|
| 30 |
def home():
|
| 31 |
email = session.get('email', None)
|
| 32 |
if email:
|
| 33 |
-
return f"
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
@app.route('/login')
|
| 37 |
def login():
|
|
|
|
| 30 |
def home():
|
| 31 |
email = session.get('email', None)
|
| 32 |
if email:
|
| 33 |
+
return f"""
|
| 34 |
+
<div style='display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column; font-family: sans-serif;'>
|
| 35 |
+
<h2>✅ Logged in as: {email}</h2>
|
| 36 |
+
<a href='/logout' style='margin-top: 10px; color: #c00;'>Logout</a>
|
| 37 |
+
</div>
|
| 38 |
+
"""
|
| 39 |
+
return """
|
| 40 |
+
<div style='display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column; font-family: sans-serif;'>
|
| 41 |
+
<h2>Welcome to CyberSentinel 👋</h2>
|
| 42 |
+
<a href='/login' style='padding: 10px 20px; background-color: #4285F4; color: white; text-decoration: none; border-radius: 5px; font-size: 16px;'>
|
| 43 |
+
🔐 Login with Google
|
| 44 |
+
</a>
|
| 45 |
+
</div>
|
| 46 |
+
"""
|
| 47 |
|
| 48 |
@app.route('/login')
|
| 49 |
def login():
|