Skip to content

LG-6204: Populate initial values based on IdV app enabled steps#6318

Merged
aduth merged 9 commits intomainfrom
aduth-lg-6204-enabled-step-initial-values
May 9, 2022
Merged

LG-6204: Populate initial values based on IdV app enabled steps#6318
aduth merged 9 commits intomainfrom
aduth-lg-6204-enabled-step-initial-values

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented May 6, 2022

Why: Because initial values should be limited to whichever step is earliest in the enabled set of steps.

Related: #6282 (comment)

@aduth aduth requested a review from solipet May 6, 2022 15:56
@aduth
Copy link
Contributor Author

aduth commented May 6, 2022

Reverting to draft to implement step-specific handling for before_action, since currently those assume (and enforce) that a profile would already exist (not compatible with password confirmation).

@aduth aduth marked this pull request as draft May 6, 2022 16:12
Copy link
Contributor

@solipet solipet left a comment

Choose a reason for hiding this comment

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

This looks fine, although once we finish the password step, we can simply remove the personal key from the initial values altogether. Or is this causing a problem in the current personal key step, having the bundle included?

@aduth
Copy link
Contributor Author

aduth commented May 6, 2022

Or is this causing a problem in the current personal key step, having the bundle included?

I expect we'd have the inverse problem: that generating the personal key before the user has entered their password will produce an unexpected outcome. In general, I think we'll run into less conflicts if we try to prepare only what's needed to get the application started based on the feature flag setting.

aduth added 3 commits May 6, 2022 15:11
**Why**: Because initial values should be limited to whichever step is earliest in the enabled set of steps.

changelog: Upcoming Features, Identity Verification, Add password confirmation step
So that we can assert specific steps in specs via URL helpers, e.g. `idv_app_path(step: 'personal_key')`
@aduth aduth force-pushed the aduth-lg-6204-enabled-step-initial-values branch from dd01364 to 2a25208 Compare May 6, 2022 19:11
@aduth aduth marked this pull request as ready for review May 6, 2022 19:11
expect(assigns[:app_data]).to include(
app_name: APP_NAME,
base_path: idv_app_path,
completion_url: idv_gpo_verify_url,
Copy link
Contributor Author

@aduth aduth May 6, 2022

Choose a reason for hiding this comment

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

We might need to rethink how we handle "completion URL", since it can be dynamic based on how the user proceeds through the flow. For example, if they opt to confirm address by mailed letter, the completion URL would be different than if they had verified by phone number.

Couple thoughts:

  • Move this handling into a controller whose route can be statically populated into the application, and whose action logic would determine where to redirect user
  • Change Personal Key step to submit to an endpoint which would be expected to respond with the redirect URL

aduth added 6 commits May 9, 2022 08:19
**Why**: So that root URL renders the app
Because it's not yet implemented as of this branch
STEP_NAMES duplicates same info we should expect from enabled_step_names config
So step name is always in the URL
@aduth aduth merged commit 95c7c31 into main May 9, 2022
@aduth aduth deleted the aduth-lg-6204-enabled-step-initial-values branch May 9, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants