LG 16327 update duplicate ssn logic ial2#12296
Conversation
There was a problem hiding this comment.
Since we're no longer letting folks continue with a duplicate - it doesn't seem like we need this.
…IAL2 Accounts with OneAccount-Enabled SP Connections
…session based tests
1fe5a8c to
0f8be5b
Compare
| profile_id: profile.id, | ||
| confirmed_all: nil, | ||
| ).present? | ||
| user_session[:duplicate_profile_id].present? |
There was a problem hiding this comment.
This now looks for a user_session value that gets set by way of
https://github.com/18F/identity-idp/blob/main/app/controllers/users/sessions_controller.rb#L322
to
https://github.com/18F/identity-idp/pull/12296/files#diff-f47539b55d5c26e09b279c33c129391acfc13ddd721bcb8142a8c9868a6c7302R20
rather than the former DB record.
| analytics.one_account_unknown_profile_detected | ||
| dupe_profile_confirmation.mark_some_profiles_not_recognized | ||
|
|
||
| user_session.delete(:duplicate_profile_id) |
There was a problem hiding this comment.
This and the one below delete the session so the user can continue on to their intended destination.
There was a problem hiding this comment.
small nitpicky but can u put it as a plural. "duplicate_profile_ids" since there can be more than one.
There was a problem hiding this comment.
That's much better. Updated with b0ca32e
| timestamp_html: render(TimeComponent.new(time: dupe_profile[:created_at])), | ||
| ) %> | ||
| </p> | ||
| <% if dupe_profile[:last_sign_in] %> |
There was a problem hiding this comment.
I added this in a previously un-merged PR. Individual local testing would throw an error if the test user hadn't logged in yet. I don't know if this would be a real-world problem.
There was a problem hiding this comment.
thanks yea i saw this. goood chatch.
| def redirect_unless_user_has_active_duplicate_profile_confirmation | ||
| if current_user&.active_profile.present? | ||
| if dupe_profile_confirmation && dupe_profile_confirmation&.confirmed_all.nil? | ||
| if !user_session[:duplicate_profile_id].nil? |
There was a problem hiding this comment.
why not just check if its present? instead of a ! nil.
🎫 Ticket
Link to the relevant ticket:
LG-16327
🛠 Summary of changes
Removes dependency on the DuplicateProfileConfirmation database object. The DB change will occur in a follow up PR.
Adds an check to the DuplicateProfileChecker service to ensure the profile belongs to a service provider issuer that is listed in the configuration
eligible_one_account_providers📜 Testing Plan
example:
eligible_one_account_providers: '["urn:gov:gsa:openidconnect:sp:sinatra"]' for OIDC