spec(SSO): メールアドレスが登録されていない場合、メアドフィールドの値にaactを入れる (MisskeyIO#607)

This commit is contained in:
まっちゃとーにゅ 2024-04-13 15:56:54 +09:00 committed by GitHub
parent 8b214f8247
commit 22e398d2bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 18 deletions

View file

@ -178,7 +178,7 @@ export class JWTIdentifyProviderService {
preferred_username: user.username,
profile: `${this.config.url}/@${user.username}`,
picture: user.avatarUrl ?? undefined,
email: profile.emailVerified ? normalizeEmailAddress(profile.email) : undefined,
email: profile.emailVerified ? normalizeEmailAddress(profile.email) : `${user.username}@${this.config.hostname}`,
email_verified: profile.emailVerified,
mfa_enabled: profile.twoFactorEnabled,
updated_at: Math.floor((user.updatedAt?.getTime() ?? user.createdAt.getTime()) / 1000),