| 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); |