Add LDAP and OpenID Connect authentication

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/f53b9394-0261-478c-aa14-813efc485813.jpg
This commit is contained in:
alphaeusmote
2025-04-10 02:01:11 +00:00
parent 0699f5acfa
commit 0dc4a0b8cc
5 changed files with 173 additions and 5 deletions
+10
View File
@@ -168,6 +168,16 @@ export class DatabaseStorage implements IStorage {
const result = await db.select().from(users).where(eq(users.username, username));
return result.length > 0 ? result[0] : undefined;
}
async getUserByProviderUserId(provider: string, providerUserId: string): Promise<User | undefined> {
const result = await db.select().from(users).where(
and(
eq(users.authProvider, provider),
eq(users.providerUserId, providerUserId)
)
);
return result.length > 0 ? result[0] : undefined;
}
async createUser(insertUser: InsertUser): Promise<User> {
const result = await db.insert(users).values(insertUser).returning();