Files
desktop/docs/Umsetzungsanweisung/Old-Nexus/partials/landingpages/auth/login.php
Lars Gebhardt-Kusche 2cdd14c400
All checks were successful
Deploy / deploy-staging (push) Successful in 24s
Deploy / deploy-production (push) Has been skipped
deploy
2026-06-20 01:50:07 +02:00

20 lines
425 B
PHP

<?php
use App\OidcClient;
$config = app()->config();
if (!$config->authEnabled) {
echo '<div class="card">Auth ist deaktiviert.</div>';
return;
}
$session = app()->session();
$session->start();
$state = bin2hex(random_bytes(16));
$nonce = bin2hex(random_bytes(16));
$_SESSION['oidc_state'] = $state;
$_SESSION['oidc_nonce'] = $nonce;
$client = new OidcClient($config);
redirect($client->authUrl($state, $nonce));