fix(oauth): correct parameter names (code_autorisation, not code)

Qobuz redirects to play.qobuz.com/discover?code_autorisation=XXX
not ?code=XXX. Both the navigation intercept and the /oauth/callback
API call were using the wrong parameter name, so the code was never
captured and the exchange request was malformed.
This commit is contained in:
vicrodh committed 2026-02-23 15:18:52 -06:00
1 parent fea13ecee7
commit 22060d1d35
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -210,7 +210,7 @@ impl QobuzClient {
.http
.get(&callback_url)
.headers(headers)
.query(&[("code", code), ("private_key", &private_key)])
.query(&[("code_autorisation", code), ("private_key", &private_key)])
.send()
.await?;
+1 -1
View File
@@ -211,7 +211,7 @@ impl QobuzClient {
.http
.get(&callback_url)
.headers(headers)
.query(&[("code", code), ("private_key", &private_key)])
.query(&[("code_autorisation", code), ("private_key", &private_key)])
.send()
.await?;
+2 -2
View File
@@ -1078,10 +1078,10 @@ pub async fn v2_start_oauth_login(
.resizable(true)
.on_navigation(move |url| {
log::info!("[OAuth] on_navigation: {}", url);
// Intercept redirect to play.qobuz.com/discover?code=...
// Intercept redirect to play.qobuz.com/discover?code_autorisation=...
if url.host_str() == Some("play.qobuz.com") {
for (key, value) in url.query_pairs() {
if key == "code" {
if key == "code_autorisation" || key == "code" {
let mut holder = code_holder_nav.lock().unwrap();
// Only act on the first code (idempotent)
if holder.is_none() {