Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a mocked version of Socure docauth #11698

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthinz
Copy link
Member

🎫 Ticket

Supports work for
LG-15187

🛠 Summary of changes

Adds a new doc auth vendor, mock_socure that allows pretending that the user went through a Socure-like doc auth experience.

This mock vendor:

  • Is not enabled by default
  • Only works when socure_docv_enabled is set to true
  • Only works in non-prod environments (in deployed envs, you should use the Socure sandbox)

📜 Testing Plan

Enable the new vendor:

  socure_docv_enabled: true
  doc_auth_vendor_default: 'mock_socure'

Then, go through IdV. Socure docv only works on mobile phones, so you need to either:

  1. Use hybrid handoff to complete doc auth on a mobile device
  2. Use your browser's developer tools to simulate a mobile device

👀 Screenshots

test-mock_socure-en

@matthinz matthinz requested review from a team and jmax-gsa and removed request for a team December 31, 2024 20:37
Add a development-only mock socure doc auth implementation.

[skip changelog]
@@ -8,6 +8,12 @@
) %>
<% end %>

<% if local_assigns.fetch(:show_test_mode_warning, false) %>
<p>
<marquee class="bg-accent-warm" ><strong>FOR TESTING ONLY.</strong> This will only <strong>simulate</strong> verifying your documents.</marquee>
Copy link
Contributor

Choose a reason for hiding this comment

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

<marquee> LOL

private

def check_not_in_prod
render_not_found if Rails.env.production?
Copy link
Member

Choose a reason for hiding this comment

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

All deployed environments (including sandbox environments) are considered production. Is that the behavior we're expecting? I see we're also only registering this route if enable_test_routes is enabled.

I'd wonder if either (a) this isn't needed since we're only registering the route in environments with test routes enabled, or (b) we could rename this to clarify "deployed environments" instead of "production" to try to preempt any potential future misunderstandings.

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.

3 participants