$clientId, 'response_type' => 'code', 'redirect_uri' => $redirectUri, 'response_mode' => 'query', 'scope' => $scope, 'state' => '12345' // Vous pouvez utiliser un générateur de nonce ici ]; $authUrl = $authority . '/oauth2/v2.0/authorize?' . http_build_query($params); header('Location: ' . $authUrl); exit(); ?>