From d5bfb45829afc06b97d126891e91eda7bd209eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=BC=C3=9F?= Date: Thu, 10 Sep 2026 18:31:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Pass=20along=20&=20preserve=20re?= =?UTF-8?q?direct=20uri=20parameter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/at/oauth.gleam | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/at/oauth.gleam b/src/at/oauth.gleam index 43e1762..374d8b0 100644 --- a/src/at/oauth.gleam +++ b/src/at/oauth.gleam @@ -342,11 +342,6 @@ pub fn public_client( redirect_uri: Uri, application_type: ApplicationType, ) -> Client { - let id = case id.host { - Some("localhost") -> Uri(..id, scheme: Some("http"), query: None) - _ -> id - } - Client( id: id, name: None, @@ -364,7 +359,6 @@ pub fn public_client( /// /// pub fn localhost_client(redirect_port: Int, redirect_path: String) -> Client { - let id = Uri(..uri.empty, scheme: Some("http"), host: Some("localhost")) let redirect_uri = Uri( ..uri.empty, @@ -373,6 +367,13 @@ pub fn localhost_client(redirect_port: Int, redirect_path: String) -> Client { port: Some(redirect_port), path: redirect_path, ) + let id = + Uri( + ..uri.empty, + scheme: Some("http"), + host: Some("localhost"), + query: Some("redirect_uri=" <> uri.to_string(redirect_uri)), + ) public_client(id, redirect_uri, Native) } -- knotmirror 0.0.1