LG-525 Fix IDV for users without phones#2398
Conversation
4ea561e to
22d3a98
Compare
There was a problem hiding this comment.
Shouldn't you be able to check user_session[:context] here? I think that should be set to idv.
There was a problem hiding this comment.
Yeah, I think that is set here: https://github.com/18F/identity-idp/blob/master/app/controllers/concerns/phone_confirmation.rb#L4
That will likely be more reliable than user_session[:jurisdiction].
There was a problem hiding this comment.
It's up to you. I wanted something as close as possible to the step before the phone verification.
There was a problem hiding this comment.
I think user_session[:jurisdiction] is what we want.
The jurisdiction step is a little bit removed from otp verification and totally subject to change. I wouldn't think we want otp verification coupled to the code that we use to filter unsupported jurisdictions.
There was a problem hiding this comment.
The is no user_session[:jurisdiction]. It's user_session[:idv_jurisdiction]. I can change it to :idv if you prefer.
There was a problem hiding this comment.
Sorry, I mistyped there. I meant to say, "I think user_session[:context] is what we want".
There was a problem hiding this comment.
Yep. I'll just add an idv_context? Sound good?
There was a problem hiding this comment.
The reality is confirmation_context should have been set in that idv code but idv context overwrote it which is why this was broken and never worked.
There was a problem hiding this comment.
The whole singular context thing is a little flawed because this screen actually exists in multiple contexts.
**Why**: Users are unable to complete IDV if they setup their account with an authenticator app. **How**: Allow sms verification if it is in the middle of IDV verification by checking a session variable. Fix the spec / test.
ae71e05 to
e5e29bb
Compare
Why: Users are unable to complete IDV if they setup their account with an authenticator app.
How: Allow sms verification if it is in the middle of IDV verification by checking a session variable. Fix the spec / test.
Hi! Before submitting your PR for review, and/or before merging it, please
go through the checklists below. These represent the more critical elements
of our code quality guidelines. The rest of the list can be found in
CONTRIBUTING.md
Controllers
authenticated, make sure to add
before_action :confirm_two_factor_authenticatedas the first callback.
Database
Unsafe migrations are implemented over several PRs and over several
deploys to avoid production errors. The strong_migrations gem
will warn you about unsafe migrations and has great step-by-step instructions
for various scenarios.
Indexes were added if necessary. This article provides a good overview
of indexes in Rails.
Verified that the changes don't affect other apps (such as the dashboard)
When relevant, a rake task is created to populate the necessary DB columns
in the various environments right before deploying, taking into account the users
who might not have interacted with this column yet (such as users who have not
set a password yet)
Migrations against existing tables have been tested against a copy of the
production database. See LG-228 Make migrations safer and more resilient #2127 for an example when a migration caused deployment
issues. In that case, all the migration did was add a new column and an index to
the Users table, which might seem innocuous.
Encryption
Routes
state or result in destructive behavior).
Session
user_sessionhelperinstead of the
sessionhelper so the data does not persist beyond the user'ssession.
Testing
and invalid inputs.