diff --git a/addons/core/package.json b/addons/core/package.json index 63edf135d..dc0e15fbb 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -37,6 +37,7 @@ "ember-loading": "^0.4.0", "ember-page-title": "^6.0.3", "ember-route-action-helper": "^2.0.8", + "ember-feature-flags": "^6.0.0", "rose": "*" }, "devDependencies": { diff --git a/ui/admin/app/templates/scopes/scope/authenticate.hbs b/ui/admin/app/templates/scopes/scope/authenticate.hbs index 15118750e..2edc1abd9 100644 --- a/ui/admin/app/templates/scopes/scope/authenticate.hbs +++ b/ui/admin/app/templates/scopes/scope/authenticate.hbs @@ -28,15 +28,31 @@ - {{#each @model.authMethods as |authMethod|}} - - {{#if authMethod.name}} - {{authMethod.name}} - {{else}} - {{t (concat "resources.auth-method.types." authMethod.type)}} - {{/if}} - - {{/each}} + {{#if (feature-flag 'oidc')}} + {{! OIDC enable: list all auth methods }} + {{#each @model.authMethods as |authMethod|}} + + {{#if authMethod.name}} + {{authMethod.name}} + {{else}} + {{t (concat "resources.auth-method.types." authMethod.type)}} + {{/if}} + + {{/each}} + {{else}} + {{! OIDC disabled: filter out OIDC auth methods}} + {{#each @model.authMethods as |authMethod|}} + {{#unless authMethod.isOIDC}} + + {{#if authMethod.name}} + {{authMethod.name}} + {{else}} + {{t (concat "resources.auth-method.types." authMethod.type)}} + {{/if}} + + {{/unless}} + {{/each}} + {{/if}} {{#if @model.authMethods}} diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index adc6342a6..1f1d8de4c 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -86,6 +86,7 @@ module.exports = function (environment) { }, featureFlags: { + oidc: false, 'primary-auth-method': false, }, }; @@ -123,6 +124,7 @@ module.exports = function (environment) { // Enable features in development ENV.featureFlags['primary-auth-method'] = true; + ENV.featureFlags['oidc'] = true; } if (environment === 'test') { diff --git a/ui/admin/package.json b/ui/admin/package.json index ce1f51482..beeac116f 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -65,7 +65,6 @@ "ember-concurrency": "^1.3.0", "ember-exam": "^6.0.1", "ember-export-application-global": "^2.0.1", - "ember-feature-flags": "^6.0.0", "ember-inline-svg": "^1.0.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", diff --git a/ui/desktop/app/templates/scopes/scope/authenticate.hbs b/ui/desktop/app/templates/scopes/scope/authenticate.hbs index 3d7d834bd..027736bc3 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate.hbs @@ -21,11 +21,23 @@ - {{#each @model.authMethods as |authMethod|}} - - {{t (concat "resources.auth-method.types." authMethod.type)}} - - {{/each}} + {{#if (feature-flag 'oidc')}} + {{! OIDC enable: list all auth methods }} + {{#each @model.authMethods as |authMethod|}} + + {{t (concat "resources.auth-method.types." authMethod.type)}} + + {{/each}} + {{else}} + {{! OIDC disabled: filter out OIDC auth methods}} + {{#each @model.authMethods as |authMethod|}} + {{#unless authMethod.isOIDC}} + + {{t (concat "resources.auth-method.types." authMethod.type)}} + + {{/unless}} + {{/each}} + {{/if}} {{#if @model.authMethods}} diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index 8e854404a..50394aa0e 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -52,6 +52,10 @@ module.exports = function (environment) { sessions: '/sessions', }, }, + + featureFlags: { + oidc: false, + }, }; if (process.env.ENABLE_MIRAGE) { @@ -69,6 +73,9 @@ module.exports = function (environment) { // of the UI, which only makes sense in development where the origin is // usually the same as the application origin. ENV.autoOrigin = true; + + // Enable features in development + ENV.featureFlags['oidc'] = true; } if (environment === 'test') {