mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -309,7 +309,6 @@ export async function oidcRoutes(app: FastifyInstance): Promise<void> {
|
|||||||
db.update(schema.users)
|
db.update(schema.users)
|
||||||
.set({
|
.set({
|
||||||
externalId: sub,
|
externalId: sub,
|
||||||
authProvider: "oidc",
|
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
})
|
})
|
||||||
.where(eq(schema.users.id, existingByEmail.id))
|
.where(eq(schema.users.id, existingByEmail.id))
|
||||||
|
|||||||
Reference in New Issue
Block a user