mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: auth sub override (#9635)
This commit is contained in:
parent
bb79df655d
commit
91b835cfeb
3 changed files with 35 additions and 13 deletions
|
|
@ -201,7 +201,7 @@ export class AuthService {
|
|||
// link existing user
|
||||
if (!user) {
|
||||
const emailUser = await this.userRepository.getByEmail(profile.email);
|
||||
if (emailUser) {
|
||||
if (emailUser && !emailUser.oauthId) {
|
||||
user = await this.userRepository.update(emailUser.id, { oauthId: profile.sub });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue