diff --git a/apps/desktop/src-tauri/src/auth.rs b/apps/desktop/src-tauri/src/auth.rs index 8f7b2789..43a76321 100644 --- a/apps/desktop/src-tauri/src/auth.rs +++ b/apps/desktop/src-tauri/src/auth.rs @@ -247,6 +247,7 @@ where .json(&serde_json::json!({ "provider": provider, "callbackURL": request.finish_url, + "newUserCallbackURL": request.finish_url, "errorCallbackURL": request.finish_url, })) .send() @@ -292,6 +293,7 @@ where .json(&serde_json::json!({ "email": email, "callbackURL": request.finish_url, + "newUserCallbackURL": request.finish_url, "errorCallbackURL": request.finish_url, })) .send() @@ -558,8 +560,8 @@ where Ok(_) => write_loopback_response( &mut stream, 200, - "Authentication successful", - "You can close this window and return to Supermemory.", + "You are authenticated", + "You can close this window and go back to Supermemory.", ), Err(error) => { write_loopback_response( diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts index 2094e5aa..4393632f 100644 --- a/apps/web/middleware.ts +++ b/apps/web/middleware.ts @@ -36,6 +36,10 @@ export default async function proxy(request: Request) { return NextResponse.next() } + if (url.pathname === "/api/auth/desktop/callback") { + return NextResponse.next() + } + if (url.pathname.startsWith("/api/")) { if (!sessionCookie) { console.debug("[MIDDLEWARE] API route without session, returning 401")