MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / getUserByAccount

Function getUserByAccount

packages/web/src/lib/encryptedPrismaAdapter.ts:46–59  ·  view source on GitHub ↗
({ provider, providerAccountId })

Source from the content-addressed store, hash-verified

44 return account;
45 },
46 async getUserByAccount({ provider, providerAccountId }) {
47 const account = await prisma.account.findUnique({
48 where: {
49 providerId_providerAccountId: {
50 providerId: provider,
51 providerAccountId,
52 },
53 },
54 include: { user: true },
55 });
56 // Cast to AdapterUser to satisfy next-auth's adapter return type;
57 // the base PrismaAdapter returns the user row directly, and we mirror it.
58 return (account?.user ?? null) as AdapterUser | null;
59 },
60 async unlinkAccount({ provider, providerAccountId }) {
61 await prisma.account.delete({
62 where: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected