Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
b8f33c4
Renames account recovery to account reactivation
el-mapache Jun 27, 2017
2e3b852
Return to branded page consistently when canceling
monfresh Jun 28, 2017
7b46cb0
Check href when testing links
monfresh Jun 28, 2017
8bee0be
Merge pull request #1509 from 18F/ab-account-reactivation-consistency
el-mapache Jun 28, 2017
ca03da1
Merge pull request #1512 from 18F/mb-update-view-spec
monfresh Jun 28, 2017
da90407
Merge pull request #1511 from 18F/mb-add-view-specs
monfresh Jun 28, 2017
aef8a02
Remove idv_session from VendorValidator
zachmargolis Jun 28, 2017
6a4f198
Use param for i18n
hursey013 Jun 27, 2017
cee76a8
Merge pull request #1513 from 18F/margolis-remove-session-from-validator
zachmargolis Jun 29, 2017
0ff17d2
Extract Idv::ProoferValidator#result
zachmargolis Jun 28, 2017
49d09a8
Merge pull request #1515 from 18F/margolis-extract-vendor-result
zachmargolis Jun 29, 2017
b0e53a7
Merge pull request #1510 from 18F/bh-param-i18n
hursey013 Jun 29, 2017
19fcc9d
Make otp_rate_limiter_spec more robust
monfresh Jun 29, 2017
1ca179d
Add CBP GOES production config
zachmargolis Jun 29, 2017
f78bc09
Merge pull request #1514 from 18F/mb-fix-otp-rate-limiter-spec
monfresh Jun 29, 2017
fd64256
Improve test coverage for OtpRequestsTracker
monfresh Jun 29, 2017
2c636fb
Add aria-hidden to accordian content div
Jun 29, 2017
505c96c
Merge pull request #1516 from 18F/mb-improve-test-coverage
monfresh Jun 30, 2017
5ab507b
Prevent Verify by mail flow redirect bug
gemfarmer Jun 30, 2017
ba9cd3c
Return FormResponse from IdV form submission
jmhooper Jun 29, 2017
938d838
Merge pull request #1519 from 18F/add_aria_hidden_to_password_info
nickbristow Jun 30, 2017
67a92ff
Merge pull request #1517 from 18F/jmhooper-return-form-responses
jmhooper Jun 30, 2017
81885e9
Merge pull request #1508 from 18F/bsh-verify-mail
gemfarmer Jun 30, 2017
299586b
Merge pull request #1518 from 18F/margolis-cbp-prod
zachmargolis Jun 30, 2017
c0b76f1
Send plain ASCII attributes in verify-by-mail
zachmargolis Jun 30, 2017
5048c9a
Merge pull request #1521 from 18F/margolis-send-ascii-to-usps
zachmargolis Jun 30, 2017
ecdad0e
Make sure i18n keys are consistent
zachmargolis Jun 30, 2017
9282b5e
Merge pull request #1522 from 18F/margolis-clean-up-i18n-keys
zachmargolis Jul 3, 2017
d459ca4
Separate idv_form from Idv::Step classes
zachmargolis Jun 30, 2017
4f45a37
Merge pull request #1520 from 18F/margolis-remove-idv-form
zachmargolis Jul 3, 2017
d0ed55d
Check in French translations
zachmargolis Jul 3, 2017
c97acca
Merge pull request #1523 from 18F/margolis-add-translations
zachmargolis Jul 5, 2017
846bbb4
Set up SMS OTP for translation
zachmargolis Jul 5, 2017
3f39840
Merge pull request #1525 from 18F/margolis-translate-sms
zachmargolis Jul 5, 2017
f221bca
Update translated JS to use locale dynamically from HTML
zachmargolis Jul 5, 2017
ae68355
Return to branded page when canceling sign in
monfresh Jul 5, 2017
f2a99ab
Add locale to URLs in mailers
zachmargolis Jul 5, 2017
506a703
Merge pull request #1526 from 18F/mb-cancel-sign-in
monfresh Jul 5, 2017
ac37006
Merge pull request #1528 from 18F/margolis-translate-js
zachmargolis Jul 5, 2017
f83ab7a
Merge pull request #1527 from 18F/margolis-translate-links-in-email
zachmargolis Jul 5, 2017
f758ecb
Extract a synchronous proofing job
zachmargolis Jul 3, 2017
7663dbc
Merge pull request #1524 from 18F/margolis-proofing-job
zachmargolis Jul 5, 2017
91b40fe
Use CBP TTP logo for GOES SPs
Jul 6, 2017
ca0688a
Merge pull request #1532 from 18F/use-cbp-ttp-logo
blacktm Jul 7, 2017
4f94d0e
Only send 10-digit phone number to equifax
monfresh Jul 11, 2017
b1812f9
Merge pull request #1535 from 18F/mb-normalize-phone
monfresh Jul 11, 2017
be38181
Update equifax gem
monfresh Jul 11, 2017
f9ce5f6
Merge pull request #1538 from 18F/mb-update-equifax-gem
monfresh Jul 11, 2017
8149fb1
Update French translations again
zachmargolis Jul 6, 2017
6de7985
Rename 2fa translation key to mfa
zachmargolis Jul 7, 2017
a97bddd
Implement custom YAML normalization
zachmargolis Jul 7, 2017
2a952e6
Merge pull request #1531 from 18F/margolis-update-fr-again
zachmargolis Jul 11, 2017
a7eca18
Allow user to cancel and verify in same session
monfresh Jul 11, 2017
f4da243
Merge pull request #1539 from 18F/mb-allow-cancel-then-verify-again
monfresh Jul 12, 2017
79dab12
Sanitize phone numbers in error messages from Twilio
zachmargolis Jul 12, 2017
4ee6342
Log country and area codes for phones we send OTPs to
zachmargolis Jul 12, 2017
778ac7a
Respond with 404 for all nonexistent assets
monfresh Jul 13, 2017
1db5b5a
Merge pull request #1540 from 18F/margolis-phone-number-logging
zachmargolis Jul 13, 2017
e38a3df
Allow multiple account creation in same session
monfresh Jul 13, 2017
1a623b9
Merge pull request #1543 from 18F/mb-404-for-all-formats
monfresh Jul 13, 2017
0e2f7ff
Run user_flow specs in available locales
zachmargolis Jul 5, 2017
a61d02a
Merge pull request #1542 from 18F/mb-preserve-sp-request
monfresh Jul 13, 2017
ab72cd2
Detect when user agent doesn't match redirect_uri
monfresh Jul 14, 2017
19b8a49
Merge pull request #1548 from 18F/mb-phone-to-browser-scenario
monfresh Jul 14, 2017
4dcdb10
Update go_back_to_mobile_app i18n entry
jeanninehunter Jul 14, 2017
c0f3ff8
Merge pull request #1549 from 18F/hunter-copytweak
monfresh Jul 14, 2017
e20dcb9
Add timestamp to ActiveJob logs
monfresh Jul 12, 2017
f279858
Merge pull request #1541 from 18F/mb-add-timestamps-to-activejob-logger
monfresh Jul 17, 2017
e85d111
Add banner to indicate environment should not have PII
zachmargolis Jul 17, 2017
aecda59
Merge pull request #1553 from 18F/margolis-no-pii-banner
zachmargolis Jul 17, 2017
1462948
Prevent access to TOTP prompt when not enabled
monfresh Jul 17, 2017
5d201eb
Require user to confirm phone with OTP during IdV
jmhooper Jul 14, 2017
360de9e
Merge pull request #1550 from 18F/jmhooper-require-idv-phone-confirma…
jmhooper Jul 18, 2017
1b1e0b7
Merge pull request #1555 from 18F/mb-prevent-totp-access
monfresh Jul 18, 2017
9410251
Revert bummr to 0.1.8
jgrevich Jul 17, 2017
84eb941
Merge pull request #1551 from 18F/jjg/fix/revert-bummr
monfresh Jul 18, 2017
2117969
Use Mandrill's HTTPS API to deliver emails
jmhooper Jun 27, 2017
37d9d46
Merge pull request #1506 from 18F/jmhooper-mandrill-mailer
jmhooper Jul 18, 2017
05641e8
Fix logic for "No PII" banner
zachmargolis Jul 18, 2017
17ac057
Add rake task to SFTP files for verify-by-mail
zachmargolis Jul 17, 2017
a3f8b71
Merge pull request #1556 from 18F/margolis-hide-pii-banner-production
zachmargolis Jul 19, 2017
4714f9c
Make proofing job asynchronous
zachmargolis Jul 6, 2017
85232f2
Merge pull request #1534 from 18F/margolis-async-proofing-job
zachmargolis Jul 19, 2017
b4471e7
Add script to extract translations from a CSV
zachmargolis Jul 19, 2017
4b8d51e
Merge pull request #1554 from 18F/margolis-sftp-task
zachmargolis Jul 20, 2017
48a1251
Update Spanish translations
zachmargolis Jul 19, 2017
a51c73b
Merge pull request #1560 from 18F/margolis-spanish-translations
zachmargolis Jul 20, 2017
39f8cf5
Normalize .yml: remove leading newlines
zachmargolis Jul 20, 2017
edcc53b
Merge pull request #1562 from 18F/margolis-clean-up-yml
zachmargolis Jul 20, 2017
913b4a2
Don't delete SP info from session after redirect
monfresh Jul 19, 2017
8103be8
Merge pull request #1561 from 18F/mb-preserve-sp-in-session-after-red…
monfresh Jul 20, 2017
2f053bc
Disable phone OTP option in select US area codes
jmhooper Jul 19, 2017
e709b85
Merge pull request #1559 from 18F/jmhooper-unsupported-phone-area-code
jmhooper Jul 20, 2017
52cae54
Fix translations in Spanish
zachmargolis Jul 20, 2017
44be06a
Merge pull request #1563 from 18F/margolis-fix-interpolation
zachmargolis Jul 20, 2017
e1cbc9b
Allow user to sign in with invalid request_id
monfresh Jul 21, 2017
0eb3b9f
Add quotes to value in application.yml
hursey013 Jul 21, 2017
e7c6603
Merge pull request #1565 from 18F/mb-dont-store-invalid-requestid-in-…
monfresh Jul 21, 2017
7fb760b
Merge pull request #1566 from 18F/bh-update-application-yml
monfresh Jul 21, 2017
32db9ab
Merge pull request #1529 from 18F/margolis-user-flows-locale
zachmargolis Jul 21, 2017
4e7363d
Remove US country code from phone validation
jmhooper Jul 13, 2017
33e9b2f
Fix IDV timeout modal copy
zachmargolis Jul 21, 2017
becc4bb
Merge pull request #1544 from 18F/jmhooper-allow-international-numbers
jmhooper Jul 21, 2017
64b2912
Add language dropdown
hursey013 Jul 20, 2017
45061ee
Merge pull request #1567 from 18F/margolis-missing-timeout-translations
zachmargolis Jul 21, 2017
9ba6827
Merge pull request #1564 from 18F/bh-i18n-dropdown
hursey013 Jul 21, 2017
044da72
Translate SMS OTP job into fr
zachmargolis Jul 24, 2017
480aade
Merge pull request #1570 from 18F/margolis-translate-otp-key
zachmargolis Jul 24, 2017
0733a6d
Update intl code as user types phone
jmhooper Jul 21, 2017
16fef6e
Merge pull request #1568 from 18F/jmhooper-phone-number-format
jmhooper Jul 26, 2017
898dac9
Merge remote-tracking branch 'origin/stages/staging' into stages/rc-2…
zachmargolis Aug 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
'app/radio-btn',
'app/print-personal-key',
'app/utils/ms-formatter',
'app/phone-internationalization',
'app/i18n-dropdown',
],
}
}
11 changes: 11 additions & 0 deletions .reek
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ DuplicateMethodCall:
- UserFlowExporter#self.massage_assets
FeatureEnvy:
exclude:
- ActiveJob::Logging::LogSubscriber#json_for
- track_registration
- append_info_to_payload
- generate_slo_request
Expand All @@ -24,6 +25,8 @@ FeatureEnvy:
- Pii::Attributes#[]=
- OpenidConnectLogoutForm#load_identity
- Idv::ProfileMaker#pii_from_applicant
- Idv::Step#vendor_validator_result
- IdvSession#vendor_result_timed_out?
InstanceVariableAssumption:
exclude:
- User
Expand All @@ -41,6 +44,8 @@ NilCheck:
LongParameterList:
exclude:
- IdentityLinker#optional_attributes
- VendorValidatorJob#perform
- Idv::VendorResult#initialize
RepeatedConditional:
exclude:
- Users::ResetPasswordsController
Expand All @@ -53,6 +58,7 @@ TooManyInstanceVariables:
exclude:
- OpenidConnectAuthorizeForm
- OpenidConnectRedirector
- Idv::VendorResult
TooManyStatements:
max_statements: 6
exclude:
Expand All @@ -72,6 +78,7 @@ TooManyMethods:
- OpenidConnect::AuthorizationController
- Idv::Session
- User
- Verify::SessionsController
UncommunicativeMethodName:
exclude:
- PhoneConfirmationFlow
Expand All @@ -89,6 +96,7 @@ UtilityFunction:
public_methods_only: true
exclude:
- AnalyticsEventJob#perform
- ApplicationController#default_url_options
- ApplicationHelper#step_class
- PersonalKeyFormatter#regexp
- SessionTimeoutWarningHelper#frequency
Expand All @@ -97,6 +105,9 @@ UtilityFunction:
- SessionDecorator
- WorkerHealthChecker::Middleware#call
- UserEncryptedAttributeOverrides#create_fingerprint
- LocaleHelper#locale_url_param
- Verify::Base#mock_vendor_partial
- IdvSession#timed_out_vendor_error
'app/controllers':
InstanceVariableAssumption:
enabled: false
Expand Down
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Metrics/BlockLength:
- 'config/initializers/secure_headers.rb'
- 'config/routes.rb'
- 'spec/**/*.rb'
- 'config/initializers/active_job_logger_patch.rb'

Metrics/ClassLength:
Description: Avoid classes longer than 100 lines of code.
Expand Down Expand Up @@ -93,6 +94,9 @@ Metrics/ModuleLength:
- spec/**/*
- 'app/controllers/concerns/two_factor_authenticatable.rb'

Metrics/ParameterLists:
CountKeywordArgs: false

# This is a Rails 5 feature, so it should be disabled until we upgrade
Rails/HttpPositionalArguments:
Description: 'Use keyword arguments instead of positional arguments in http method calls.'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ gem 'http_accept_language'
gem 'httparty'
gem 'json-jwt'
gem 'lograge'
gem 'net-sftp'
gem 'newrelic_rpm'
gem 'pg'
gem 'phonelib'
gem 'phony_rails'
gem 'premailer-rails'
gem 'proofer', github: '18F/identity-proofer-gem', branch: 'master'
Expand Down Expand Up @@ -113,4 +115,5 @@ end

group :production do
gem 'equifax', git: 'git@github.com:18F/identity-equifax-api-client-gem.git', branch: 'master'
gem 'mandrill_dm'
end
21 changes: 17 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: git@github.com:18F/identity-equifax-api-client-gem.git
revision: 4308a502baf7b65e8b463ecafc2d428d530b4349
revision: 889aad815bda2ff2a41cd2b108e2afae7f50d8b8
branch: master
specs:
equifax (1.0.0)
Expand Down Expand Up @@ -148,7 +148,7 @@ GEM
bullet (5.5.1)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.10.0)
bummr (0.2.0)
bummr (0.1.8)
rainbow
thor
byebug (9.0.6)
Expand Down Expand Up @@ -247,6 +247,7 @@ GEM
errbase (0.0.3)
erubis (2.7.0)
eventmachine (1.0.9.1)
excon (0.57.0)
execjs (2.7.0)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -300,7 +301,7 @@ GEM
httpi (2.4.2)
rack
socksify
i18n (0.8.4)
i18n (0.8.6)
i18n-tasks (0.9.15)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
Expand All @@ -314,7 +315,7 @@ GEM
ice_nine (0.11.2)
iniparse (1.4.2)
jmespath (1.3.1)
json (2.1.0)
json (1.8.6)
json-jwt (1.7.2)
activesupport
bindata
Expand Down Expand Up @@ -348,6 +349,12 @@ GEM
skinny (~> 0.2.3)
sqlite3 (~> 1.3)
thin (~> 1.5.0)
mandrill-api (1.0.53)
excon (>= 0.16.0, < 1.0)
json (>= 1.7.7, < 2.0)
mandrill_dm (1.3.4)
mail (~> 2.6)
mandrill-api (~> 1.0.53)
memory_profiler (0.9.8)
method_source (0.8.2)
mime-types (3.1)
Expand All @@ -360,6 +367,8 @@ GEM
nenv (0.3.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (4.1.0)
newrelic_rpm (4.2.0.334)
nokogiri (1.8.0)
Expand All @@ -376,6 +385,7 @@ GEM
parser (2.4.0.0)
ast (~> 2.2)
pg (0.21.0)
phonelib (0.6.12)
phony (2.15.44)
phony_rails (0.14.6)
activesupport (>= 3.0)
Expand Down Expand Up @@ -696,9 +706,12 @@ DEPENDENCIES
json-jwt
lograge
mailcatcher
mandrill_dm
net-sftp
newrelic_rpm
overcommit
pg
phonelib
phony_rails
poltergeist
premailer-rails
Expand Down
1 change: 1 addition & 0 deletions app/assets/images/globe-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/globe-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/sp-logos/cbp-ttp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/spinner.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/assets/javascripts/app/components/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Accordion extends Events {
this.content.classList.add('shown');
this.content.classList.remove('animate-out');
this.content.classList.add('animate-in');
this.content.setAttribute('aria-hidden', 'false');
this.emit('accordion.show');
}

Expand All @@ -81,6 +82,7 @@ class Accordion extends Events {
this.shownIcon.classList.add('display-none');
this.content.classList.remove('animate-in');
this.content.classList.add('animate-out');
this.content.setAttribute('aria-hidden', 'true');
this.emit('accordion.hide');
this.header.focus();
}
Expand Down
5 changes: 3 additions & 2 deletions app/assets/javascripts/app/form-field-format.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PhoneFormatter, SocialSecurityNumberFormatter, TextField } from 'field-kit';
import { SocialSecurityNumberFormatter, TextField } from 'field-kit';
import DateFormatter from './modules/date-formatter';
import InternationalPhoneFormatter from './modules/international-phone-formatter';
import NumericFormatter from './modules/numeric-formatter';
import PersonalKeyFormatter from './modules/personal-key-formatter';
import ZipCodeFormatter from './modules/zip-code-formatter';
Expand All @@ -13,7 +14,7 @@ function formatForm() {
['.home_equity_line', new NumericFormatter()],
['.mfa', new NumericFormatter()],
['.mortgage', new NumericFormatter()],
['.phone', new PhoneFormatter()],
['.phone', new InternationalPhoneFormatter()],
['.personal-key', new PersonalKeyFormatter()],
['.ssn', new SocialSecurityNumberFormatter()],
['.zipcode', new ZipCodeFormatter()],
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/app/form-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (input) {
input.addEventListener('input', () => {
if (input.validity.patternMismatch) {
input.setCustomValidity(I18n.t(`idv.errors.pattern_mismatch.${f}`));
input.setCustomValidity(I18n.t(`idv.errors.pattern_mismatch.${I18n.key(f)}`));
} else {
input.setCustomValidity('');
}
Expand Down
18 changes: 18 additions & 0 deletions app/assets/javascripts/app/i18n-dropdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'classlist.js';

document.addEventListener('DOMContentLoaded', () => {
const mobileLink = document.querySelector('.i18n-mobile-toggle');
const mobileDropdown = document.querySelector('.i18n-mobile-dropdown');
const desktopLink = document.querySelector('.i18n-desktop-toggle');
const desktopDropdown = document.querySelector('.i18n-desktop-dropdown');

function initDropdown (trigger, dropdown) {
trigger.addEventListener('click', function() {
this.classList.toggle('focused');
dropdown.classList.toggle('focused');
});
}

if (mobileLink) initDropdown(mobileLink, mobileDropdown);
if (desktopLink) initDropdown(desktopLink, desktopDropdown);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { Formatter } from 'field-kit';
import { asYouType as AsYouType } from 'libphonenumber-js';

const fixCountryCodeSpacing = (text, countryCode) => {
// If the text is `+123456`, make it `+123 456`
if (text[countryCode.length + 1] !== ' ') {
return text.replace(`+${countryCode}`, `+${countryCode} `);
}
return text;
};

const getFormattedTextData = (text) => {
if (text === '1') {
text = '+1';
}

const asYouType = new AsYouType('US');
let formattedText = asYouType.input(text);
const countryCode = asYouType.country_phone_code;

if (asYouType.country_phone_code) {
formattedText = fixCountryCodeSpacing(formattedText, countryCode);
}

return {
text: formattedText,
template: asYouType.template,
countryCode,
};
};

const cursorPosition = (formattedTextData) => {
// If the text is `(23 )` the cursor goes after the 3
const match = formattedTextData.text.match(/\d[^\d]*$/);
if (match) {
return match.index + 1;
}
return formattedTextData.text.length + 1;
};

class InternationalPhoneFormatter extends Formatter {
format(text) {
const formattedTextData = getFormattedTextData(text);
return super.format(formattedTextData.text);
}

// eslint-disable-next-line class-methods-use-this
parse(text) {
return text.replace(/[^\d+]/g, '');
}

isChangeValid(change, error) {
const formattedTextData = getFormattedTextData(change.proposed.text);
const previousFormattedTextData = getFormattedTextData(change.current.text);

if (previousFormattedTextData.template &&
!formattedTextData.template &&
change.inserted.text.length === 1
) {
return false;
}

change.proposed.text = formattedTextData.text;
change.proposed.selectedRange.start = cursorPosition(formattedTextData);
return super.isChangeValid(change, error);
}
}

export default InternationalPhoneFormatter;
Loading