@orangelogic/orange-dam-content-browser-sdk 2.3.4 → 2.3.5-pr105265.2

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
@@ -53,6 +53,35 @@ yarn build
53
53
  # More guide
54
54
  For detail guides on usage check out the [Orange Logic Developer Portal](https://developer.orangelogic.com/docs/generic-asset-browser)
55
55
 
56
+ ## Reuse the Current Cortex Login
57
+
58
+ For an HTML page served by the Cortex site, enable `useSiteSession` to use the
59
+ browser's existing site login. No site URL, token callback, or SDK login is needed.
60
+ Load `build/OrangeDAMContentBrowserSDK.min.js` and
61
+ `build/OrangeDAMContentBrowserSDK.min.css`, then open the picker with:
62
+
63
+ ```html
64
+ <div id="asset-picker" style="height: 600px"></div>
65
+ <script>
66
+ OrangeDAMContentBrowser.open({
67
+ containerId: 'asset-picker',
68
+ useSiteSession: true,
69
+ onAssetSelected: (assets) => console.log(assets),
70
+ });
71
+ </script>
72
+ ```
73
+
74
+ The site defaults to `window.location.origin`. For a Cortex installation under a
75
+ virtual directory, supply a `baseUrl` on that same origin. The HTML page (or iframe
76
+ document) must run on the Cortex origin; loading the SDK script from Cortex into a
77
+ page on another domain does not share its login.
78
+
79
+ This mode uses cookies managed by the browser and ignores saved SDK credentials,
80
+ `onRequestToken`, and `useSession`. It hides SDK logout and does not launch SDK
81
+ authentication when the site session expires. Sign in through the Cortex site and
82
+ reopen the picker to resume. Omit `useSiteSession` to retain the existing SDK
83
+ authentication flow.
84
+
56
85
  # Change Log
57
86
  * March 24, 2026 - v2.2.3
58
87
  * Supports displaying asset thumbnails according to the selected format (https://link.orangelogic.com/Tasks/420YSB)