Prefer email for MFA account label (#609)

This commit is contained in:
shenlan 2025-10-31 15:47:29 +08:00 committed by GitHub
parent adf41b573d
commit 1e0e6cdfdd

View File

@ -242,14 +242,14 @@ export default function MfaSetupPanel() {
const nextAccount = typeof data?.account === 'string' ? data.account.trim() : ''
const resolvedAccountLabel = (() => {
const username = typeof user?.username === 'string' ? user.username.trim() : ''
if (username) {
return username
}
const email = typeof user?.email === 'string' ? user.email.trim() : ''
if (email) {
return email
}
const username = typeof user?.username === 'string' ? user.username.trim() : ''
if (username) {
return username
}
const name = typeof user?.name === 'string' ? user.name.trim() : ''
if (name) {
return name