fix(SSO): 認証の結果のデータがXMLスキーマと合わない問題を修正

This commit is contained in:
まっちゃとーにゅ 2024-03-17 23:07:03 +09:00
parent b4b8b98336
commit beab1e09bb
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
2 changed files with 25 additions and 30 deletions

View file

@ -171,11 +171,11 @@ export class JWTIdentifyProviderService {
const roles = await this.roleService.getUserRoles(user.id);
const payload: JWTPayload = {
name: user.name,
name: user.name ?? user.username,
preferred_username: user.username,
profile: `${this.config.url}/@${user.username}`,
picture: user.avatarUrl,
email: profile.email,
picture: user.avatarUrl ?? undefined,
email: profile.emailVerified ? profile.email : undefined,
email_verified: profile.emailVerified,
mfa_enabled: profile.twoFactorEnabled,
updated_at: Math.floor((user.updatedAt?.getTime() ?? user.createdAt.getTime()) / 1000),