Skip to content

SDKS-4738: Migrate Legacy SDK To OIDC Client In Reactjs Davinci Sample App#92

Open
SteinGabriel wants to merge 6 commits intomainfrom
SDKS-4738
Open

SDKS-4738: Migrate Legacy SDK To OIDC Client In Reactjs Davinci Sample App#92
SteinGabriel wants to merge 6 commits intomainfrom
SDKS-4738

Conversation

@SteinGabriel
Copy link

@SteinGabriel SteinGabriel commented Feb 14, 2026

https://pingidentity.atlassian.net/browse/SDKS-4738

Description

Migrates React DaVinci Todo sample app from legacy SDK (@forgerock/javascript-sdk) to OIDC Client (@forgerock/oidc-client), aligning with patterns established in React Journey sample app.

Changes

New Files:

  • client/context/oidc.context.js - OIDC context provider managing client initialization and auth state
  • client/context/protect.context.js - Protect API context provider (bootstrap mode)
  • client/context/theme.context.js - Theme context provider (migrated from global-state)

Deleted Files:

  • client/global-state.js - Removed AppContext in favor of dedicated context providers
  • client/utilities/oidc-client.js - Removed singleton pattern

Key Modifications:

  • client/index.js - Bootstrap pattern with Init component and loading gate (matches react-journey)
  • client/utilities/request.js - Replace HttpClient.request with native fetch + Bearer token
  • client/utilities/route.js - Validate routes using oidcClient.token.get() and oidcClient.user.info()
  • client/components/davinci-client/hooks/oauth.hook.js - Token exchange via oidcClient.token.exchange()
    (previously TokenManager.getTokens())
  • client/components/layout/header.js - Pass all query params to login link (not just centralLogin/journey)
  • All components - Migrated from AppContext to OidcContext, ProtectContext, and ThemeContext
  • package.json - Swap @forgerock/javascript-sdk@forgerock/oidc-client
  • JSDoc comments - Updated to reflect OIDC client implementation; copyright year updated to 2026

@SteinGabriel SteinGabriel changed the title SDKS-4738: Migrate Legacy SDK To OIDC Client SDKS-4738: Migrate Legacy SDK To OIDC Client In Reactjs Davinci Sample App Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments