fix login to keep url (again)

This commit is contained in:
Akurosia Kamo 2026-05-24 08:02:32 +02:00
parent fd0de86dbc
commit 8217f68a0f
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ $state = bin2hex(random_bytes(16));
$_SESSION['pkce_verifier'] = $verifier;
$_SESSION['oauth_state'] = $state;
$_SESSION['oauth_return'] = null;
$_SESSION['oauth_return'] = safe_return_path($_GET['return'] ?? null);
$params = http_build_query([
'response_type' => 'code',

View File

@ -21,7 +21,7 @@
<?php endif; ?>
</p>
<a href="auth/start.php" class="btn btn-gold btn-login">
<a href="<?= htmlspecialchars(auth_start_href(), ENT_QUOTES) ?>" class="btn btn-gold btn-login">
<?= $tokenExpired ? 'Reconnect to FFLogs' : 'Connect to FFLogs' ?>
</a>

View File

@ -23,7 +23,7 @@
</select>
</div>
<button class="btn btn-gold" type="submit" style="align-self:flex-end">Fetch</button>
<a class="btn" href="auth/start.php" style="align-self:flex-end;text-decoration:none">Reconnect</a>
<a class="btn" href="<?= htmlspecialchars(auth_start_href(), ENT_QUOTES) ?>" style="align-self:flex-end;text-decoration:none">Reconnect</a>
</div>
</form>
</div>