From 737b0d0e73857cd3ad7ee8bb366223905fdc8c36 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sun, 9 Nov 2025 02:18:28 -0500 Subject: [PATCH] feat: update token URL construction in login method and add debug output --- src/OverteAuth.cpp | 9 ++++++++- src/OverteAuth.hpp | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/OverteAuth.cpp b/src/OverteAuth.cpp index 92f68a4..b508a3b 100644 --- a/src/OverteAuth.cpp +++ b/src/OverteAuth.cpp @@ -63,7 +63,14 @@ bool OverteAuth::login(const std::string& username, const std::string& password, } // Construct OAuth token endpoint - std::string tokenUrl = m_metaverseUrl + "/oauth/token"; + // From Overte AccountManager: /oauth/token path under metaverse server + std::string tokenUrl = m_metaverseUrl; + if (tokenUrl.back() == '/') { + tokenUrl.pop_back(); + } + tokenUrl += "/api/v1/token"; // Try API v1 endpoint + + std::cout << "[OverteAuth] Token URL: " << tokenUrl << std::endl; // Construct POST data std::ostringstream postData; diff --git a/src/OverteAuth.hpp b/src/OverteAuth.hpp index da2aaf3..61166b6 100644 --- a/src/OverteAuth.hpp +++ b/src/OverteAuth.hpp @@ -1,6 +1,7 @@ // OverteAuth.hpp #pragma once +#include #include #include