fix(oidc): preserve authProvider on auto-link

Linked users keep authProvider="local" so they can still log in
with their local password. Only externalId is set during linking.
This commit is contained in:
SnapOtter
2026-05-13 20:11:11 +08:00
parent 85e3ed0c65
commit f467191e9b
-1
View File
@@ -309,7 +309,6 @@ export async function oidcRoutes(app: FastifyInstance): Promise<void> {
db.update(schema.users)
.set({
externalId: sub,
authProvider: "oidc",
updatedAt: new Date(),
})
.where(eq(schema.users.id, existingByEmail.id))