Login: Microsoft-Auth per Env-Variable deaktivierbar machen

Im lokalen Docker-Betrieb funktioniert der Microsoft-OAuth-Flow nicht.
DISABLE_MS_AUTH=1 in docker-compose.yml schaltet ihn ab und zeigt
stattdessen ein einfaches Dev-Login-Formular (Eingabe der User-ID
aus main_contact). Auf 0 setzen, um MS-Auth wieder zu aktivieren.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 14:03:53 +02:00
parent bc08a1f35c
commit c55777c089

View File

@@ -20,7 +20,7 @@ $translation = \DynCom\mysyde\common\classes\Registry::get('translation');
$isAzure = true; $isAzure = getenv('DISABLE_MS_AUTH') !== '1';
if ($isAzure) { if ($isAzure) {
@@ -260,11 +260,33 @@ getQuote();
} }
} }
else { else {
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dev Login</title>
<style>
body { font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f0f0f0; }
.box { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15); min-width: 280px; }
.box h2 { margin: 0 0 1rem; font-size: 1.1rem; color: #c00; }
.box label { display: block; margin-bottom: .25rem; font-size: .85rem; color: #555; }
.box input[type=number] { width: 100%; box-sizing: border-box; padding: .5rem; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 1rem; font-size: 1rem; }
.box button { width: 100%; padding: .6rem; background: #0078d4; color: #fff; border: none; border-radius: 4px; font-size: 1rem; cursor: pointer; }
.box button:hover { background: #005fa3; }
.note { margin-top: .75rem; font-size: .75rem; color: #999; text-align: center; }
</style>
</head>
<body>
<div class="box">
<h2>⚠️ Dev-Login (kein Microsoft)</h2>
<form method="post">
<label>User-ID (aus main_contact)</label>
<input type="number" name="fgztiknxbhhk" min="1" required autofocus />
<button type="submit">Einloggen</button>
</form>
<p class="note">Nur lokal verfügbar — DISABLE_MS_AUTH=1 in docker-compose.yml</p>
</div>
</body>
<?php <?php
} }
?> ?>