feat: add read-only GitHub App access alongside OAuth

This commit is contained in:
Thomas Durieux committed 2026-09-09 22:08:12 +02:00
1 parent e5c44845f0
commit a60ad6a921
49 files changed
+1754 -139

No files matched your search

+1
View File
@@ -145,6 +145,7 @@ export async function verifyCredentials(db: mongo.Db, cipher: Cipher) {
let checked = 0;
for await (const row of db.collection("credentials").find({})) {
cipher.decrypt(row.encryptedToken as EncryptedToken, String(row.ownerId), row.provider);
if (row.encryptedRefreshToken) cipher.decrypt(row.encryptedRefreshToken as EncryptedToken, String(row.ownerId), row.provider, "encryptedRefreshToken");
if (!(await db.collection("users").findOne({ _id: row.ownerId, status: { $ne: "removed" } }))) {
throw new Error("Credential has no active owner");
}