preferred_username should be... preferred (#199445)

Apparently it's possible for preferred_username to be like `foo@mybiz.com` while `email` is set to `foo@mybizemail.com`... This is the more correct ordering.
This commit is contained in:
Tyler James Leonhardt
2023-11-28 12:45:50 -08:00
committed by GitHub
parent 1b358ac5aa
commit 1501e97f52

View File

@@ -536,7 +536,7 @@ export class AzureActiveDirectoryService {
scope: scopeData.scopeStr,
sessionId,
account: {
label: claims.email ?? claims.preferred_username ?? claims.unique_name ?? 'user@example.com',
label: claims.preferred_username ?? claims.email ?? claims.unique_name ?? 'user@example.com',
id,
type: claims.tid === MSA_TID || claims.tid === MSA_PASSTHRU_TID ? MicrosoftAccountType.MSA : MicrosoftAccountType.AAD
}