feat: update authorization URL construction to use /server path instead of /api/v1

This commit is contained in:
MayaTheShy
2025-11-09 19:49:00 -05:00
parent a12f940c00
commit 4f22aeb155

View File

@@ -644,13 +644,13 @@ bool OverteAuth::loginWithBrowser(const std::string& metaverseUrl) {
m_receivedAuthCode.clear();
// Construct authorization URL
// Overte uses /api/v1/oauth/authorize endpoint
// Overte uses /server/oauth/authorize endpoint
std::string authUrl = m_metaverseUrl;
if (authUrl.back() == '/') authUrl.pop_back();
// Check if URL already has /api/v1 path, if not add it
if (authUrl.find("/api/v1") == std::string::npos) {
authUrl += "/api/v1";
// Check if URL already has /server path, if not add it
if (authUrl.find("/server") == std::string::npos) {
authUrl += "/server";
}
authUrl += "/oauth/authorize?";
authUrl += "response_type=code";