Skip to content

High performance self-hosted photo and video management solution.

fix: oauth account linking (#29624)

Daniel Dietzlerf8e78792b894
diff --git a/server/src/services/auth.service.ts b/server/src/services/auth.service.ts
index 5323252738..6cfc60d583 100644
--- a/server/src/services/auth.service.ts
+++ b/server/src/services/auth.service.ts
@@ -426,7 +426,7 @@ export class AuthService extends BaseService {
throw new BadRequestException('This OAuth account has already been linked to another user.');
}
- if (auth.session) {
+ if (auth.session && sid) {
await this.sessionRepository.update(auth.session.id, { oauthSid: sid });
}