Skip to content

Conversation

@ancheetah
Copy link
Contributor

@ancheetah ancheetah commented Jul 16, 2025

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

The INIT_PROTECT flag allows for Protect to be initialized either at bootstrap or when a ProtectCollector is found in the DaVinci flow.

DO NOT MERGE: This PR relies on the next release of @forgerock/davinci-client and @pingidentity/protect. They are currently installed from a local registry, blocking CI from passing.

@ancheetah ancheetah force-pushed the SDKS-4147-react-protect-dv branch from dd84076 to 6f1cb8c Compare July 16, 2025 15:36
@ancheetah ancheetah added the do not merge Do not merge label Jul 16, 2025
@ancheetah ancheetah marked this pull request as ready for review July 16, 2025 19:34
@ancheetah ancheetah requested review from cerebrl and ryanbas21 July 16, 2025 19:34
console.error('Missing PingOne environment ID for Protect initialization');
} else {
try {
protectAPI = await protect({ envId: PINGONE_ENV_ID });
Copy link
Contributor

@ryanbas21 ryanbas21 Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering why we needed the protect api in context... and i guess it dawned on me that we're trying to keep the returned api around in the react app, is that accurate?

Couldn't we avoid needing this in context and just initialize this in the component mapper and pass it down?

I don't love the idea of needing this in context

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. The idea was to show both options: initializing at bootstrap time and initializing when we get the ProtectCollector. This follows the similar pattern found in the react AIC todo app.

@ancheetah
Copy link
Contributor Author

Closing in favor of #58

@ancheetah ancheetah closed this Jul 24, 2025
@ancheetah ancheetah deleted the SDKS-4147-react-protect-dv branch July 24, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Do not merge

Development

Successfully merging this pull request may close these issues.

3 participants