This commit is contained in:
pradeepkumar
2026-03-26 15:18:59 +05:30
parent 924b03f459
commit e9f135e9b7
3 changed files with 21 additions and 6 deletions

View File

@@ -227,7 +227,9 @@ export class AuthService {
? 'googleId'
: dto.provider === 'facebook'
? 'facebookId'
: 'twitterId';
: dto.provider === 'apple'
? 'appleId'
: 'twitterId';
// Check if user exists with this provider ID
let user = await this.prisma.user.findFirst({
@@ -262,7 +264,9 @@ export class AuthService {
? AuthProvider.GOOGLE
: dto.provider === 'facebook'
? AuthProvider.FACEBOOK
: AuthProvider.TWITTER;
: dto.provider === 'apple'
? AuthProvider.APPLE
: AuthProvider.TWITTER;
// Parse name
const nameParts = dto.name?.split(' ') || [];
@@ -304,6 +308,7 @@ export class AuthService {
firstName,
lastName,
avatar: dto.avatar,
agentTypeId: dto.agentTypeId || undefined,
},
});
}