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

LG-538 New Document Authentication Design #2741

Merged
merged 11 commits into from
Feb 11, 2019
Merged

Conversation

stevegsa
Copy link
Contributor

@stevegsa stevegsa commented Feb 11, 2019

Why: So our users can verify their identity on mobile phones with a camera or desktop computers with a scanned image.

How: Detect whether a user is on a mobile phone or a laptop/desktop. Add new flows to accommodate desktop computers, mobile phones, desktop computers to mobile phones (ie user wants to use their phone camera because a desktop or laptop camera generally does not have enough resolution), and mobile phones to desktop computers (ie user has a scanner). Add image previews on document uploads. Supply different verbiage for taking a picture vs. uploading an image.

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

  • When adding a new controller that requires the user to be fully
    authenticated, make sure to add before_action :confirm_two_factor_authenticated
    as 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

  • The changes are compatible with data that was encrypted with the old code.

Routes

  • GET requests are not vulnerable to CSRF attacks (i.e. they don't change
    state or result in destructive behavior).

Session

  • When adding user data to the session, use the user_session helper
    instead of the session helper so the data does not persist beyond the user's
    session.

Testing

  • Tests added for this feature/bug
  • Prefer feature/integration specs over controller specs
  • When adding code that reads data, write tests for nil values, empty strings,
    and invalid inputs.

@stevegsa
Copy link
Contributor Author

stevegsa commented Feb 11, 2019

Screenshots:

Desktop only flow:

screen shot 2019-02-10 at 9 31 20 pm


User selects "Use your computer"

screen shot 2019-02-10 at 9 31 52 pm


screen shot 2019-02-10 at 9 41 34 pm


screen shot 2019-02-10 at 9 43 42 pm


screen shot 2019-02-10 at 9 45 20 pm


screen shot 2019-02-10 at 9 45 55 pm


screen shot 2019-02-10 at 9 46 18 pm


screen shot 2019-02-10 at 9 46 54 pm


screen shot 2019-02-10 at 9 47 33 pm


screen shot 2019-02-10 at 9 48 14 pm


Mobile only flow:

screen shot 2019-02-10 at 10 12 47 pm


User selects "Use your phone"

screen shot 2019-02-10 at 10 13 15 pm


(user scrolls the screen)

screen shot 2019-02-10 at 10 13 30 pm


screen shot 2019-02-11 at 12 28 13 am


screen shot 2019-02-10 at 10 14 53 pm


screen shot 2019-02-10 at 10 15 22 pm


screen shot 2019-02-10 at 10 15 38 pm


screen shot 2019-02-10 at 10 15 53 pm


screen shot 2019-02-10 at 10 16 08 pm


screen shot 2019-02-10 at 10 16 27 pm


screen shot 2019-02-10 at 10 17 01 pm


Desktop to phone flow:

screen shot 2019-02-10 at 10 40 25 pm


user selects "Use your phone"

screen shot 2019-02-10 at 10 40 46 pm


screen shot 2019-02-10 at 10 41 10 pm


screen shot 2019-02-10 at 10 41 48 pm


text message:

screen shot 2019-02-10 at 10 43 01 pm


Mobile to desktop flow:

screen shot 2019-02-10 at 11 25 06 pm


User chooses "Use your computer"

screen shot 2019-02-10 at 11 25 28 pm


screen shot 2019-02-10 at 11 25 48 pm


Email message sent to desktop computer:

screen shot 2019-02-10 at 11 26 38 pm

**Why**: So our users can verify their identity on mobile phones with a camera or desktop computers with a scanned image.

**How**: Detect whether a user is one a mobile phone or a desktop.  Add new flows to accomodate desktop computers, mobile phones, desktop computers to mobile phones (ie user wants to use their camera), and mobile phones to desktop computers (ie user has a scanner).  Add image previews on document uploads.  Supply different verbiage for taking a picture vs. uploading an image.
@stevegsa stevegsa force-pushed the stevegsa-new-doc-auth-design branch from 3bc5077 to 43e7e27 Compare February 11, 2019 05:42
Copy link
Contributor

@jgsmith-usds jgsmith-usds 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 okay. We can polish in the next release if we need to.

@stevegsa stevegsa merged commit b9208e3 into master Feb 11, 2019
@nickttng
Copy link
Member

@stevegsa Latest iteration in InVision - DocAuth v5b if you want to peek. Meanwhile, I'm checking with @erinzstrenio about any content edit needed.

@stevegsa
Copy link
Contributor Author

@nickttng the design looks great!

@nickttng
Copy link
Member

@stevegsa We have reviewed and updated the v5b. It's good to go. Let us know if you have questions / thoughts.

@amathews-fs amathews-fs deleted the stevegsa-new-doc-auth-design branch January 7, 2021 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants