- Updated dependencies [
d849256]:- @forgerock/sdk-request-middleware@2.0.1
- @forgerock/storage@2.0.1
- @forgerock/sdk-logger@2.0.1
- @forgerock/sdk-oidc@2.0.1
- @forgerock/sdk-types@2.0.1
- @forgerock/sdk-utilities@2.0.1
-
#524
4c17ba5Thanks @ryanbas21! - BREAKING CHANGE: Journey client methods now returnGenericErrorinstead ofundefinedfor error cases.The
start,next,resume, andterminatemethods now return aGenericErrorobject instead ofundefinedwhen encountering unknown step types or error conditions. This aligns the journey client with the DaVinci client's error handling patterns.Method Before After startJourneyStep | JourneyLoginSuccess | JourneyLoginFailure | undefinedJourneyStep | JourneyLoginSuccess | JourneyLoginFailure | GenericErrornextJourneyStep | JourneyLoginSuccess | JourneyLoginFailure | undefinedJourneyStep | JourneyLoginSuccess | JourneyLoginFailure | GenericErrorresumeJourneyStep | JourneyLoginSuccess | JourneyLoginFailure | undefinedJourneyStep | JourneyLoginSuccess | JourneyLoginFailure | GenericErrorterminatevoidvoid | GenericErrorBefore:
const step = await client.start(); if (step) { // Use step } After: const result = await client.start(); if ('error' in result) { // Handle error console.error(result.message); } else { // Use step }
-
#502
9ad4062Thanks @ryanbas21! - releasing version 2 of the ping javascript sdk -
#525
9a8ca14Thanks @ryanbas21! - BREAKING: Unify journey-client around wellknown-only configurationThis release simplifies the configuration API by requiring the
wellknownURL and automatically inferringbaseUrlandrealmPath.- Removed
baseUrlfromJourneyServerConfig: ThebaseUrlis now always inferred from the wellknown URL. If inference fails (non-AM server), an error is returned. - Removed
hasWellknownConfigexport: This type guard is no longer needed since all configs use wellknown.
Before:
journey({ config: { serverConfig: { baseUrl: 'https://am.example.com/am/' }, realmPath: 'alpha', }, });
After:
journey({ config: { serverConfig: { wellknown: 'https://am.example.com/am/oauth2/alpha/.well-known/openid-configuration', }, // realmPath is now optional - inferred from wellknown issuer }, });
- Automatic
baseUrlinference from wellknown URL (extracts path before/oauth2/) - Automatic
realmPathinference from wellknown issuer - Improved error messages for non-AM servers, guiding users to appropriate clients
- Updated README with comprehensive API documentation
- Removed
-
#527
bca228eThanks @ancheetah! - Expose return types for clients -
#525
9a8ca14Thanks @ryanbas21! - ### @forgerock/journey-clientAdd well-known OIDC endpoint discovery support. The journey client can now fetch configuration from the
.well-known/openid-configurationendpoint. The realm path can be automatically inferred from the well-known issuer URL.Add shared well-known module with RTK Query API for OIDC endpoint discovery:
wellknownApi- RTK Query API for fetching well-known configurationcreateWellknownSelector- Selector factory for cached well-known datacreateWellknownError- Typed error creation from fetch failures- Re-exports pure utilities from
@forgerock/sdk-utilities
Add pure well-known utilities:
inferRealmFromIssuer- Extract realm path from AM issuer URLsisValidWellknownUrl- Validate well-known URLs (HTTPS required, HTTP allowed for localhost)
Refactored to use shared well-known module from
@forgerock/sdk-oidc.Refactored to use shared well-known module from
@forgerock/sdk-oidc.
-
#500
e99b374Thanks @ancheetah! - Add support for KBAallowUserDefinedQuestionsflag -
#544
15b8329Thanks @ancheetah! - Removed duplicate middleware config and added support for typed middleware -
Updated dependencies [
3c63979,ad81c13,9ad4062,9a8ca14,5a9ea40]:- @forgerock/sdk-utilities@2.0.0
- @forgerock/storage@2.0.0
- @forgerock/sdk-logger@2.0.0
- @forgerock/sdk-oidc@2.0.0
- @forgerock/sdk-request-middleware@2.0.0
- @forgerock/sdk-types@2.0.0
-
#412
b0f4368Thanks @ryanbas21! - feat: Implement new journey client- Implemented a new
journey()factory function for creating stateful client instances. - Integrated Redux Toolkit and RTK Query for robust state management and API interactions.
- Refactored
resumelogic to correctly persist and retrieve plainSteppayloads, resolving prototype loss issues during serialization. - Improved error handling and type safety within the client.
- Updated internal callback handling and device profiling integration.
- Implemented a new
-
#412
b0f4368Thanks @ryanbas21! - feat(journey-client): Add WebAuthn, QR Code, and Recovery Code support- Introduces new utility modules (
FRWebAuthn,FRQRCode,FRRecoveryCodes) to handle advanced authentication methods within authentication journeys. - Adds comprehensive parsing and handling for WebAuthn registration and authentication steps, including a fix for a type error where
TextOutputCallbackwas being incorrectly inferred asTextInputCallback. - Implements support for displaying QR codes (for both OTP and Push) and for displaying and using recovery codes.
- Includes extensive unit tests for the new callback types and utility modules to ensure correctness.
- Updates documentation to reflect the new capabilities and architectural changes.
- Introduces new utility modules (