diff --git a/web/.eslintrc.precommit.json b/web/.eslintrc.precommit.json
index c2c06589ce..6e81348788 100644
--- a/web/.eslintrc.precommit.json
+++ b/web/.eslintrc.precommit.json
@@ -23,7 +23,7 @@
"quotes": ["error", "double", { "avoidEscape": true }],
"semi": ["error", "always"],
"@typescript-eslint/ban-ts-comment": "off",
- "sonarjs/cognitive-complexity": ["error", 9],
+ "sonarjs/cognitive-complexity": ["warn", 9],
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-nested-template-literals": "off"
}
diff --git a/web/scripts/eslint-precommit.mjs b/web/scripts/eslint-precommit.mjs
index c65f953e21..b225c31e85 100644
--- a/web/scripts/eslint-precommit.mjs
+++ b/web/scripts/eslint-precommit.mjs
@@ -35,7 +35,7 @@ const eslintConfig = {
"quotes": ["error", "double", { avoidEscape: true }],
"semi": ["error", "always"],
"@typescript-eslint/ban-ts-comment": "off",
- "sonarjs/cognitive-complexity": ["error", 9],
+ "sonarjs/cognitive-complexity": ["warn", 9],
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-nested-template-literals": "off",
},
@@ -72,5 +72,6 @@ const formatter = await eslint.loadFormatter("stylish");
const resultText = formatter.format(results);
const errors = results.reduce((acc, result) => acc + result.errorCount, 0);
+// eslint-disable-next-line no-console
console.log(resultText);
process.exit(errors > 1 ? 1 : 0);
diff --git a/web/src/admin/applications/wizard/methods/oauth/ak-application-wizard-authentication-by-oauth.ts b/web/src/admin/applications/wizard/methods/oauth/ak-application-wizard-authentication-by-oauth.ts
index 54bc7d2eae..2e83858380 100644
--- a/web/src/admin/applications/wizard/methods/oauth/ak-application-wizard-authentication-by-oauth.ts
+++ b/web/src/admin/applications/wizard/methods/oauth/ak-application-wizard-authentication-by-oauth.ts
@@ -3,11 +3,14 @@ import "@goauthentik/admin/common/ak-crypto-certificate-search";
import "@goauthentik/admin/common/ak-flow-search/ak-branded-flow-search";
import {
clientTypeOptions,
- defaultScopes,
issuerModeOptions,
redirectUriHelp,
subjectModeOptions,
} from "@goauthentik/admin/providers/oauth2/OAuth2ProviderForm";
+import {
+ makeOAuth2PropertyMappingsSelector,
+ oauth2PropertyMappingsProvider,
+} from "@goauthentik/admin/providers/oauth2/Oauth2PropertyMappings.js";
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { ascii_letters, digits, first, randomString } from "@goauthentik/common/utils";
import "@goauthentik/components/ak-number-input";
@@ -15,6 +18,7 @@ import "@goauthentik/components/ak-radio-input";
import "@goauthentik/components/ak-switch-input";
import "@goauthentik/components/ak-text-input";
import "@goauthentik/components/ak-textarea-input";
+import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
import "@goauthentik/elements/forms/FormGroup";
import "@goauthentik/elements/forms/HorizontalFormElement";
@@ -23,17 +27,8 @@ import { customElement, state } from "@lit/reactive-element/decorators.js";
import { html, nothing } from "lit";
import { ifDefined } from "lit/directives/if-defined.js";
-import {
- ClientTypeEnum,
- FlowsInstancesListDesignationEnum,
- PropertymappingsApi,
- SourcesApi,
-} from "@goauthentik/api";
-import {
- type OAuth2Provider,
- type PaginatedOAuthSourceList,
- type PaginatedScopeMappingList,
-} from "@goauthentik/api";
+import { ClientTypeEnum, FlowsInstancesListDesignationEnum, SourcesApi } from "@goauthentik/api";
+import { type OAuth2Provider, type PaginatedOAuthSourceList } from "@goauthentik/api";
import BaseProviderPanel from "../BaseProviderPanel";
@@ -42,22 +37,11 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
@state()
showClientSecret = true;
- @state()
- propertyMappings?: PaginatedScopeMappingList;
-
@state()
oauthSources?: PaginatedOAuthSourceList;
constructor() {
super();
- new PropertymappingsApi(DEFAULT_CONFIG)
- .propertymappingsScopeList({
- ordering: "scope_name",
- })
- .then((propertyMappings: PaginatedScopeMappingList) => {
- this.propertyMappings = propertyMappings;
- });
-
new SourcesApi(DEFAULT_CONFIG)
.sourcesOauthList({
ordering: "name",
@@ -222,36 +206,19 @@ export class ApplicationWizardAuthenticationByOauth extends BaseProviderPanel {
name="propertyMappings"
.errorMessages=${errors?.propertyMappings ?? []}
>
-
+
${msg( "Select which scopes can be used by the client. The client still has to specify the scope to access the data.", )}
-- ${msg("Hold control/command to select multiple items.")} -