From 243eb205fb6a1cb9ddf3c09485b69d0bb07feab0 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Thu, 29 Jan 2026 00:32:10 +0300 Subject: [PATCH] Allow prompt-only login and strip login_hint Remove the login_hint query param when a prompt is requested and allow onLogin to proceed with an empty handle if prompt is provided. This supports prompt-based login flows without carrying a prefilled hint. --- apps/api/src/bsky/app.ts | 3 +++ apps/web/src/layouts/Main.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/api/src/bsky/app.ts b/apps/api/src/bsky/app.ts index 1cdacb6a..a64c8704 100644 --- a/apps/api/src/bsky/app.ts +++ b/apps/api/src/bsky/app.ts @@ -39,6 +39,9 @@ app.get("/login", async (c) => { if (cli) { ctx.kv.set(`cli:${handle}`, "1"); } + if (prompt) { + url.searchParams.delete("login_hint"); + } return c.redirect(url.toString()); } catch (e) { c.status(500); diff --git a/apps/web/src/layouts/Main.tsx b/apps/web/src/layouts/Main.tsx index 610317a5..d55bb0ad 100644 --- a/apps/web/src/layouts/Main.tsx +++ b/apps/web/src/layouts/Main.tsx @@ -109,7 +109,7 @@ function Main(props: MainProps) { useProfile(token || localStorage.getItem("token")); const onLogin = async (prompt?: string) => { - if (!handle.trim()) { + if (!handle.trim() && !prompt) { return; } -- 2.51.2