feat(microsoft-integration): enhance email permissions and consent flow for Outlook integration
This commit is contained in:
@@ -43,8 +43,17 @@ $state = generate_oauth_state((int)$user['id']);
|
||||
$_SESSION['ms_oauth_state'] = $state;
|
||||
$_SESSION['ms_oauth_user_id'] = (int)$user['id'];
|
||||
|
||||
// Onthoud eventuele gewenste terugkeerpagina (bijv. /mail.php)
|
||||
if (!empty($_GET['return_to'])) {
|
||||
$_SESSION['ms_oauth_return_to'] = trim($_GET['return_to']);
|
||||
} else {
|
||||
unset($_SESSION['ms_oauth_return_to']);
|
||||
}
|
||||
|
||||
$forceConsent = !empty($_GET['reconsent']) || !empty($_GET['force']);
|
||||
|
||||
// Stuur gebruiker door naar Microsoft login
|
||||
$authUrl = microsoft_get_auth_url($clientId, $redirectUri, $tenantId, $state);
|
||||
$authUrl = microsoft_get_auth_url($clientId, $redirectUri, $tenantId, $state, $forceConsent);
|
||||
header("Location: {$authUrl}");
|
||||
exit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user