New User Panel with TOTP & change password. Admin Panel added Global OTPAuth URL

This commit is contained in:
Ryan
2025-03-30 14:44:53 -04:00
committed by GitHub
parent 27de0a9a48
commit 3f1007b1b3
13 changed files with 918 additions and 351 deletions

View File

@@ -11,7 +11,12 @@ if (file_exists($configFile)) {
echo json_encode(['error' => 'Failed to decrypt configuration.']);
exit;
}
echo $decryptedContent;
// Decode the configuration and ensure globalOtpauthUrl is set
$config = json_decode($decryptedContent, true);
if (!isset($config['globalOtpauthUrl'])) {
$config['globalOtpauthUrl'] = "";
}
echo json_encode($config);
} else {
echo json_encode([
'oidc' => [
@@ -24,7 +29,8 @@ if (file_exists($configFile)) {
'disableFormLogin' => false,
'disableBasicAuth' => false,
'disableOIDCLogin' => false
]
],
'globalOtpauthUrl' => ""
]);
}
?>