$cfg['client_id'], 'redirect_uri' => baseUrl().'/callback.php', 'response_type' => 'code', 'state' => $_SESSION['oauth_state'], ])); } catch (Throwable $e) { http_response_code(503); echo htmlspecialchars($e->getMessage()); }