diff --git a/e2e/thunder-config/deployment.yaml b/e2e/thunder-config/deployment.yaml index dfa5bf6b8..d6600c26f 100644 --- a/e2e/thunder-config/deployment.yaml +++ b/e2e/thunder-config/deployment.yaml @@ -9,9 +9,9 @@ tls: key_file: "repository/resources/security/server.key" database: - identity: + config: type: "sqlite" - path: "repository/database/thunderdb.db" + path: "repository/database/config.db" options: "_journal_mode=WAL&_busy_timeout=5000&_pragma=foreign_keys(1)" max_open_conns: 500 max_idle_conns: 100 diff --git a/packages/javascript/src/models/v2/embedded-flow-v2.ts b/packages/javascript/src/models/v2/embedded-flow-v2.ts index 88642e6e2..828130bcf 100644 --- a/packages/javascript/src/models/v2/embedded-flow-v2.ts +++ b/packages/javascript/src/models/v2/embedded-flow-v2.ts @@ -504,10 +504,10 @@ export interface ConsentPurposeData { essential: string[]; /** Attributes that the user can optionally decline */ optional: string[]; + /** Unique identifier for the purpose */ + purposeId: string; /** Human-readable purpose name */ purposeName?: string; - /** Unique identifier for the purpose */ - purpose_id: string; } /** diff --git a/packages/react/src/components/adapters/Consent.tsx b/packages/react/src/components/adapters/Consent.tsx index 68b42b4b1..10ba12549 100644 --- a/packages/react/src/components/adapters/Consent.tsx +++ b/packages/react/src/components/adapters/Consent.tsx @@ -54,7 +54,7 @@ export interface ConsentProps { * * {({ purposes, formValues, onInputChange, t }) => ( *
- * {purposes.map(p => )} + * {purposes.map(p => )} *
* )} *
@@ -104,10 +104,10 @@ const Consent: FC = ({consentData, formValues, onInputChange, chil return (
{purposes.map((purpose: ConsentPurposeData, purposeIndex: number) => ( -
+
{/* TODO: Uncomment when the backend supports multiple purposes for a application */} {/* - {purpose.purpose_name} + {purpose.purposeName} {purpose.description} diff --git a/packages/react/src/components/adapters/ConsentCheckboxList.tsx b/packages/react/src/components/adapters/ConsentCheckboxList.tsx index 23424953a..f59e95a2e 100644 --- a/packages/react/src/components/adapters/ConsentCheckboxList.tsx +++ b/packages/react/src/components/adapters/ConsentCheckboxList.tsx @@ -125,13 +125,13 @@ const ConsentCheckboxList: FC = ({ if (isEssential) { return true; } - const key: string = getConsentOptionalKey(purpose.purpose_id, attrName); + const key: string = getConsentOptionalKey(purpose.purposeId, attrName); // Default to opted-in (true) when there's no explicit form value return formValues[key] !== 'false'; }; const handleChange = (attrName: string, checked: boolean): void => { - const key: string = getConsentOptionalKey(purpose.purpose_id, attrName); + const key: string = getConsentOptionalKey(purpose.purposeId, attrName); onInputChange(key, checked ? 'true' : 'false'); }; @@ -142,7 +142,7 @@ const ConsentCheckboxList: FC = ({ return (
{attributes.map((attr: string) => { - const inputId: string = `consent_${isEssential ? 'ess' : 'opt'}_${purpose.purpose_id}_${attr}`; + const inputId: string = `consent_${isEssential ? 'ess' : 'opt'}_${purpose.purposeId}_${attr}`; const checked: boolean = isChecked(attr); return ( diff --git a/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx b/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx index 287081b9f..a25335062 100644 --- a/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx +++ b/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx @@ -271,12 +271,12 @@ const createAuthComponentFromFlow = ( ...p.essential.map((attr: string): ConsentAttributeElement => ({approved: !isDeny, name: attr})), ...p.optional.map( (attr: string): ConsentAttributeElement => ({ - approved: isDeny ? false : formValues[getConsentOptionalKey(p.purpose_id, attr)] !== 'false', + approved: isDeny ? false : formValues[getConsentOptionalKey(p.purposeId, attr)] !== 'false', name: attr, }), ), ], - purposeName: (p as any).purposeName ?? (p as any).purpose_name, + purposeName: p.purposeName, }), ), }; diff --git a/packages/react/src/components/presentation/auth/SignIn/v2/SignIn.tsx b/packages/react/src/components/presentation/auth/SignIn/v2/SignIn.tsx index 2fefb3c60..3c26f5769 100644 --- a/packages/react/src/components/presentation/auth/SignIn/v2/SignIn.tsx +++ b/packages/react/src/components/presentation/auth/SignIn/v2/SignIn.tsx @@ -564,14 +564,14 @@ const SignIn: FC = ({ name: attr, })), ...(p.optional || []).map((attr: string) => { - const key: string = `__consent_opt__${p.purpose_id}__${attr}`; + const key: string = `__consent_opt__${p.purposeId}__${attr}`; return { approved: isDeny ? false : processedInputs[key] !== 'false', name: attr, }; }), ], - purposeName: (p as any).purposeName ?? (p as any).purpose_name, + purposeName: p.purposeName, })), }; processedInputs['consent_decisions'] = JSON.stringify(decisions);