-
Notifications
You must be signed in to change notification settings - Fork 155
Description
Is your feature request related to a problem? Please describe.
Right now, each entry in the auth config has an enabled flag that activates a single auth strategy in the switch found in src/service/passport.
It would be great to allow multiple auth strategies to be loaded dynamically rather than only allowing the enabled auth method in proxy.config.json when starting the backend:
Describe the solution you'd like
Load ALL the strategies with valid configurations and add frontend support so users can choose an option.
Describe alternatives you've considered
In our recently added OIDC support (#906), we are hard-coding the OIDC option to the list of auth methods. This is a bit too rigid since users want to log in with any method their organization provides.
Additional context
This is how the passport is being configured right now src/service/passport:
const configure = async () => {
const type = authenticationConfig.type.toLowerCase();
switch (type) {
case 'activedirectory':
_passport = await activeDirectory.configure();
break;
case 'local':
_passport = await local.configure();
break;
case 'openidconnect':
_passport = await oidc.configure();
break;
default:
throw Error(`uknown authentication type ${type}`);
}
_passport.type = authenticationConfig.type;
return _passport;
};