@descope/react-sdk 2.30.10 → 2.30.11

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
@@ -204,7 +204,7 @@ const App = () => {
204
204
  A function that is called whenever there is a new screen state and after every next call. It receives the following parameters:
205
205
 
206
206
  - `screenName`: The name of the screen that is about to be rendered
207
- - `context`: An object containing the upcoming screen state
207
+ - `context`: An object containing the upcoming screen state. All server-produced screen data lives under `context.data`.
208
208
  - `next`: A function that, when called, continues the flow execution
209
209
  - `ref`: A reference to the descope-wc node
210
210
 
@@ -213,6 +213,13 @@ The function can be sync or async, and should return a boolean indicating whethe
213
213
  - `true`: Render a custom screen
214
214
  - `false`: Render the default flow screen
215
215
 
216
+ > **Breaking change (v-next):** server-produced screen data that used to sit directly on
217
+ > `context` now lives under **`context.data`** — e.g. `context.totp` → `context.data.totp`,
218
+ > `context.inboundAppApproveScopes` → `context.data.inboundAppApproveScopes`. Status,
219
+ > `form`, and identity fields (`user` / `project` / `lastAuth`) stay at the top level.
220
+ > See the [@descope/web-component README](https://www.npmjs.com/package/@descope/web-component#the-context-object)
221
+ > for the full list of `context.data` fields.
222
+
216
223
  This function allows rendering custom screens instead of the default flow screens.
217
224
  It can be useful for highly customized UIs or specific logic not covered by the default screens
218
225
 
@@ -1,2 +1,2 @@
1
- "use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.10"};
1
+ "use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.11"};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1,2 +1,2 @@
1
- const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.10"},d="undefined"!=typeof window;export{d as IS_BROWSER,e as baseHeaders};
1
+ const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.11"},d="undefined"!=typeof window;export{d as IS_BROWSER,e as baseHeaders};
2
2
  //# sourceMappingURL=constants.js.map