web/flows: fix IdentificationStage's label not matching fields
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
00cbaaf672
commit
2e4e17adb7
|
@ -149,15 +149,15 @@ export class IdentificationStage extends BaseStage<IdentificationChallenge, Iden
|
|||
${t`Select one of the sources below to login.`}
|
||||
</p>`;
|
||||
}
|
||||
const fields = this.challenge?.userFields.sort() || [];
|
||||
if (fields === [UserFieldsEnum.Email]) {
|
||||
const fields = this.challenge?.userFields || [];
|
||||
if (fields.includes(UserFieldsEnum.Email) && fields.length === 1) {
|
||||
label = t`Email`;
|
||||
type = "email";
|
||||
} else if (fields === [UserFieldsEnum.Username]) {
|
||||
} else if (fields.includes(UserFieldsEnum.Username) && fields.length === 1) {
|
||||
label = t`Username`;
|
||||
} else if (fields === [UserFieldsEnum.Upn]) {
|
||||
} else if (fields.includes(UserFieldsEnum.Upn) && fields.length === 1) {
|
||||
label = t`UPN`;
|
||||
} else if (fields === [UserFieldsEnum.Email, UserFieldsEnum.Username]) {
|
||||
} else if (fields.includes(UserFieldsEnum.Email) && fields.includes(UserFieldsEnum.Username) && fields.length === 2) {
|
||||
label = t`Email or username`;
|
||||
} else {
|
||||
label = t`Email, UPN or username`;
|
||||
|
|
|
@ -114,5 +114,13 @@ module.exports = {
|
|||
editUrl: "https://github.com/goauthentik/authentik/edit/master/website/",
|
||||
},
|
||||
],
|
||||
[
|
||||
'@docusaurus/plugin-sitemap',
|
||||
{
|
||||
changefreq: 'weekly',
|
||||
priority: 0.5,
|
||||
trailingSlash: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
|
|
Reference in New Issue