$config['client_id'], 'response_type' => 'code', 'redirect_uri' => $config['redirect_uri'], 'response_mode' => 'query', 'scope' => $config['scopes'], ]; $authUrl = $config['auth_url'] . '?' . http_build_query($params); header("Location: $authUrl"); exit;