mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
fix oauth resume redirect (#1122)
Fix the Claude Desktop MCP OAuth resume path after login/org selection. - drop stale signed Better Auth params before resuming \`/oauth2/authorize\` - consume \`prompt=login\` so approve can continue to consent/code redirect instead of looping back to login Tested with \`bunx biome check apps/web/app/'(auth)'/login/page.tsx\`.
This commit is contained in:
parent
651e304735
commit
8de01a49d3
1 changed files with 13 additions and 0 deletions
|
|
@ -33,6 +33,19 @@ function buildMcpAuthorizeResumeUrl(
|
|||
const p = new URLSearchParams(sp.toString())
|
||||
p.delete("redirect")
|
||||
p.delete("error")
|
||||
p.delete("exp")
|
||||
p.delete("sig")
|
||||
|
||||
const prompt = p
|
||||
.get("prompt")
|
||||
?.split(" ")
|
||||
.filter((value) => value && value !== "login")
|
||||
if (prompt?.length) {
|
||||
p.set("prompt", prompt.join(" "))
|
||||
} else {
|
||||
p.delete("prompt")
|
||||
}
|
||||
|
||||
return `${backend}/api/auth/oauth2/authorize?${p.toString()}`
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue