You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the full type-level mapping see [`interface_mapping.md` § Authentication Flow](./interface_mapping.md#3-authentication-flow). The three implementation pain points that aren't obvious from the type table:
156
+
157
+
**1. `tree` is no longer threaded through `next()`.**
158
+
159
+
The legacy pattern merged `initOptions` and `nextOptions` and passed the combined object to both `start()` and `next()`, carrying `tree` through every call. In the new SDK, `next()` does not accept a journey name — it only takes `{ query? }`. Remove any options merging/forwarding from your `next()` wrapper.
160
+
161
+
```typescript
162
+
// Legacy — options object merged and threaded through every call
**2. A journey stack stored `StepOptions[]`; it now stores `StartParam[]`.**
171
+
172
+
If you maintain a stack for switching between trees, the stored type changes from `StepOptions` to `StartParam` and the deduplication key changes from `tree` to `journey`:
173
+
174
+
```typescript
175
+
// Legacy
176
+
if (options?.tree!==current[current.length-1]?.tree) { ... }
177
+
178
+
// New
179
+
if (options?.journey!==current[current.length-1]?.journey) { ... }
The legacy SDK created step objects by instantiating `new FRStep(payload)`, `new FRLoginSuccess(payload)`, or `new FRLoginFailure(payload)`. The new SDK creates these internally — there are no classes to instantiate. Because all three types are plain objects, replace every `new FR*` call with an object literal typed against the corresponding interface:
Copy file name to clipboardExpand all lines: interface_mapping.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ Flat lookup table for AI context injection. Every legacy symbol → new import i
105
105
|`ErrorCode`| Removed — use `GenericError.type` instead |
106
106
|`FRAuth`|`import { journey } from '@forgerock/journey-client'` — factory returns `JourneyClient`|
107
107
|`FRCallback`|`import { BaseCallback } from '@forgerock/journey-client/types'`|
108
-
|`FRDevice`|`import { deviceClient } from '@forgerock/device-client'`|
108
+
|`FRDevice`|`import { Device } from '@forgerock/journey-client/device'`|
109
109
|`FRLoginFailure`|`import type { JourneyLoginFailure } from '@forgerock/journey-client/types'`|
110
110
|`FRLoginSuccess`|`import type { JourneyLoginSuccess } from '@forgerock/journey-client/types'`|
111
111
|`FRPolicy`|`import { Policy } from '@forgerock/journey-client/policy'`|
@@ -178,7 +178,7 @@ The legacy SDK is a single package. The new SDK splits concerns across multiple
178
178
|`import { deviceClient } from '@forgerock/javascript-sdk'`|`import { deviceClient } from '@forgerock/device-client'`| deviceClient |
179
179
|`import { FRAuth } from '@forgerock/javascript-sdk'`|`import { journey } from '@forgerock/journey-client'`| FRAuth |
180
180
|`import { FRCallback } from '@forgerock/javascript-sdk'`|`import { BaseCallback } from '@forgerock/journey-client/types'`| FRCallback |
181
-
|`import { FRDevice } from '@forgerock/javascript-sdk'`|`import { deviceClient } from '@forgerock/device-client'`| FRDevice |
181
+
|`import { FRDevice } from '@forgerock/javascript-sdk'`|`import { Device } from '@forgerock/journey-client/device'`| FRDevice |
182
182
|`import type { FRLoginFailure } from '@forgerock/javascript-sdk'`|`import type { JourneyLoginFailure } from '@forgerock/journey-client/types'`| FRLoginFailure |
183
183
|`import type { FRLoginSuccess } from '@forgerock/javascript-sdk'`|`import type { JourneyLoginSuccess } from '@forgerock/journey-client/types'`| FRLoginSuccess |
184
184
|`import { FRPolicy } from '@forgerock/javascript-sdk'`|`import { Policy } from '@forgerock/journey-client/policy'`| FRPolicy |
@@ -955,10 +955,10 @@ if (type === WebAuthnStepType.Authentication) {
955
955
956
956
### FRDevice (Device Profile Collection)
957
957
958
-
| Legacy API | New API | Return Type Change | Behavioral Notes|
0 commit comments