core/apps/webapp/app/routes/api.v1.oauth.callback.tsx
Harshith Mullapudi 038acea669
Feat: added integration connect and mcp oAuth (#20)
* Feat: added integration connect and mcp oAuth

* Feat: add mcp support to chat

* Fix: UI for integrations and logs

* Fix: ui

* Fix: proxy server

* Feat: enhance MCP tool integration and loading functionality

* Fix: added header

* Fix: Linear integration sync

---------

Co-authored-by: Manoj K <saimanoj58@gmail.com>
2025-07-17 12:41:32 +05:30

22 lines
663 B
TypeScript

import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
import { callbackHandler } from "~/services/oauth/oauth.server";
import type { CallbackParams } from "~/services/oauth/oauth-utils.server";
// This route handles the OAuth callback, similar to the NestJS controller
const { loader } = createActionApiRoute(
{
allowJWT: false,
corsStrategy: "all",
},
async ({ request }) => {
const url = new URL(request.url);
const params: CallbackParams = {};
for (const [key, value] of url.searchParams.entries()) {
params[key] = value;
}
return await callbackHandler(params);
},
);
export { loader };