core/apps/webapp/app/services/postAuth.server.ts
Harshith Mullapudi 4a0a57cb97
Feat: add documents to the kg (#64)
* Feat: add documents to the kg

* Feat: add versioning to documents

* Fix: invalidation of evolved facts

* fix: mcp return

* fix: invalidAt is not displayed in graph popover

* Fix: use document id for the flow

* refactor: consolidate document versioning around sessionId instead of documentId

* fix: add docs link in welcome email

* fix: give more time for larger graphs to settle on

* bump: new version 0.1.20

---------

Co-authored-by: Manoj K <saimanoj58@gmail.com>
2025-09-03 12:39:46 +05:30

21 lines
454 B
TypeScript

import type { User } from "~/models/user.server";
import { createWorkspace } from "~/models/workspace.server";
export async function postAuthentication({
user,
loginMethod,
isNewUser,
}: {
user: User;
loginMethod: User["authenticationMethod"];
isNewUser: boolean;
}) {
if (user.name && isNewUser && loginMethod === "GOOGLE") {
await createWorkspace({
name: user.name,
userId: user.id,
integrations: [],
});
}
}