MCPcopy
hub / github.com/nextauthjs/next-auth / account

Function account

packages/adapter-firebase/tests/index.test.ts:52–64  ·  view source on GitHub ↗
({ provider, providerAccountId })

Source from the content-addressed store, hash-verified

50 return null;
51 },
52 async account({ provider, providerAccountId }) {
53 const snapshotQuery = query(Accounts, where("provider", "==", provider), where("providerAccountId", "==", providerAccountId), limit(1));
54 const snapshots = await getDocs(snapshotQuery);
55 const snapshot = snapshots.docs[0];
56
57 if (snapshot?.exists() && Accounts.converter) {
58 const account = Accounts.converter.fromFirestore(snapshot);
59
60 return account;
61 }
62
63 return null;
64 },
65 async verificationToken({ identifier, token }) {
66 const snapshotQuery = query(VerificationTokens, where("identifier", "==", identifier), where("token", "==", token), limit(1));
67 const snapshots = await getDocs(snapshotQuery);

Callers

nothing calls this directly

Calls 1

queryFunction · 0.85

Tested by

no test coverage detected