diff --git a/web/src/flows/stages/identification/IdentificationStage.ts b/web/src/flows/stages/identification/IdentificationStage.ts index 59c306aee..b5f7136cc 100644 --- a/web/src/flows/stages/identification/IdentificationStage.ts +++ b/web/src/flows/stages/identification/IdentificationStage.ts @@ -149,15 +149,15 @@ export class IdentificationStage extends BaseStage`; } - 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`; diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index a6cdec870..144f0ce66 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -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, + }, + ], ], };