From 97da502a8e6a7a274d5003297956883cfb739e47 Mon Sep 17 00:00:00 2001 From: Niek Rabelink Date: Tue, 8 Sep 2026 19:37:58 +0200 Subject: [PATCH] feat: ondersteuning voor admin_consent parameter in OAuth callback --- auth/callback_microsoft.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/auth/callback_microsoft.php b/auth/callback_microsoft.php index ce8f349..673a757 100644 --- a/auth/callback_microsoft.php +++ b/auth/callback_microsoft.php @@ -59,7 +59,13 @@ if (!$stateUserId && (empty($receivedState) || empty($expectedState) || !hash_eq exit; } -// 3. Autorisatiecode controleren +// Afhandeling van beheerderstoestemming (Admin Consent) +if (!empty($_GET['admin_consent'])) { + header('Location: /integrations.php?success=' . urlencode('Beheerdersgoedkeuring voor uw organisatie is succesvol verleend! Klik nu op "Koppel Outlook" om uw agenda te synchroniseren.')); + exit; +} + +// 5. Autorisatiecode controleren $code = $_GET['code'] ?? ''; if (empty($code)) { header('Location: /integrations.php?error=' . urlencode('Geen autorisatiecode ontvangen van Microsoft.'));