@eudiplo/sdk-core 9.1.0-main.8cd17d9 → 9.1.0-main.8ea50c6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -95,9 +95,11 @@ import { EudiploClient } from '@eudiplo/sdk-core';
95
95
 
96
96
  const client = new EudiploClient({...});
97
97
 
98
- // Create DC API session with request object
98
+ // Create DC API session with request object. In a browser, origin defaults
99
+ // to location.origin; on a server, set the origin of your page.
99
100
  const session = await client.createDcApiPresentationRequest({
100
101
  configId: 'age-over-18',
102
+ origin: 'https://shop.example',
101
103
  });
102
104
 
103
105
  // Submit using the browser-native DC API end-to-end
@@ -108,6 +110,7 @@ const result = await client.submitDcApiPresentation(session);
108
110
 
109
111
  For production deployments, keep `clientId` and `clientSecret` on the server.
110
112
  Use `EudiploClient` methods to run the full flow (`createDcApiPresentationRequest` + `submitDcApiPresentation`) from trusted backend/application code.
113
+ Server-side calls must pass `origin`, the origin of the page that calls the wallet, taken from your own configuration and never from the end user's request. Without it, EUDIPLO answers `400` unless the presentation configuration lists exactly one allowed origin.
111
114
 
112
115
  ### Class-based API (More Control)
113
116