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.`}
|
${t`Select one of the sources below to login.`}
|
||||||
</p>`;
|
</p>`;
|
||||||
}
|
}
|
||||||
const fields = this.challenge?.userFields.sort() || [];
|
const fields = this.challenge?.userFields || [];
|
||||||
if (fields === [UserFieldsEnum.Email]) {
|
if (fields.includes(UserFieldsEnum.Email) && fields.length === 1) {
|
||||||
label = t`Email`;
|
label = t`Email`;
|
||||||
type = "email";
|
type = "email";
|
||||||
} else if (fields === [UserFieldsEnum.Username]) {
|
} else if (fields.includes(UserFieldsEnum.Username) && fields.length === 1) {
|
||||||
label = t`Username`;
|
label = t`Username`;
|
||||||
} else if (fields === [UserFieldsEnum.Upn]) {
|
} else if (fields.includes(UserFieldsEnum.Upn) && fields.length === 1) {
|
||||||
label = t`UPN`;
|
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`;
|
label = t`Email or username`;
|
||||||
} else {
|
} else {
|
||||||
label = t`Email, UPN or username`;
|
label = t`Email, UPN or username`;
|
||||||
|
|
|
@ -114,5 +114,13 @@ module.exports = {
|
||||||
editUrl: "https://github.com/goauthentik/authentik/edit/master/website/",
|
editUrl: "https://github.com/goauthentik/authentik/edit/master/website/",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'@docusaurus/plugin-sitemap',
|
||||||
|
{
|
||||||
|
changefreq: 'weekly',
|
||||||
|
priority: 0.5,
|
||||||
|
trailingSlash: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue