Skip to content

Commit

Permalink
feat: update selected_remote helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithNava committed Aug 13, 2024
1 parent 653f4c2 commit 54ce8f5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,25 @@ def update
end
end

def self.selected_remote(idv_session:)
if IdentityConfig.store.in_person_proofing_opt_in_enabled &&
IdentityConfig.store.in_person_proofing_enabled &&
idv_session.service_provider&.in_person_proofing_enabled
idv_session.skip_doc_auth_from_handoff == false
else
idv_session.skip_doc_auth_from_handoff.nil? ||
idv_session.skip_doc_auth_from_handoff == false
end
end

def self.step_info
Idv::StepInfo.new(
key: :hybrid_handoff,
controller: self,
next_steps: [:link_sent, :document_capture],
preconditions: ->(idv_session:, user:) {
idv_session.idv_consent_given &&
# back from ipp doc capture screen
idv_session.skip_doc_auth_from_handoff
self.selected_remote(idv_session: idv_session)
},
undo_step: ->(idv_session:, user:) do
idv_session.flow_path = nil
Expand Down

0 comments on commit 54ce8f5

Please sign in to comment.