-
Notifications
You must be signed in to change notification settings - Fork 166
LG-9951: Add confirmation prompt when user selects backup code as sole MFA #8597
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
Changes from all commits
067ef37
31e4ac2
919dfec
10b4ea6
cc9af87
d55e69c
a879543
2cf1599
7c9d401
cb7669a
6d4293e
c21040b
1058d60
fe7aa37
e077013
5d1e31f
ec372bc
0460e74
97e2be0
ec14b02
95eca8c
7079f51
1276149
67f05a2
e46983b
ddea7a3
70787a1
e7ca55c
c4031e1
d0e16be
220480f
6b3c18a
6a96a38
33b1ce6
79c527a
e816c33
876ddf2
49bfd12
25b2628
a0a051d
c2d4525
1fc132c
4ed14c3
a25d75d
0ce10e0
3ef970a
cb05246
8216d8a
d838c59
42452c2
c887445
6d75996
c8883ef
7e8c352
d188217
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <% title t('titles.backup_codes') %> | ||
|
|
||
| <%= render PageHeadingComponent.new.with_content(t('titles.backup_codes')) %> | ||
|
|
||
| <p> | ||
| <%= t('two_factor_authentication.backup_codes.warning_html') %> | ||
| </p> | ||
|
|
||
| <p> | ||
| <%= t('two_factor_authentication.backup_codes.instructions', app_name: APP_NAME) %> | ||
| </p> | ||
|
|
||
| <div class="grid-row margin-top-5"> | ||
| <div class="tablet:grid-col-6"> | ||
| <%= render ButtonComponent.new( | ||
| action: ->(**tag_options, &block) { link_to(sign_up_completed_path, **tag_options, &block) }, | ||
| big: true, | ||
| full_width: true, | ||
| class: 'margin-bottom-205', | ||
| ).with_content(t('two_factor_authentication.backup_codes.saved_backup_codes')) %> | ||
| </div> | ||
| </div> | ||
| <div class="grid-row"> | ||
| <div class="tablet:grid-col-6"> | ||
| <%= render ButtonComponent.new( | ||
| action: ->(**tag_options, &block) { link_to(backup_code_regenerate_path, **tag_options, &block) }, | ||
| big: true, | ||
| full_width: true, | ||
| outline: true, | ||
| ).with_content(t('two_factor_authentication.backup_codes.new_backup_codes')) %> | ||
| </div> | ||
| </div> | ||
|
|
||
| <%= render PageFooterComponent.new do %> | ||
| <%= link_to t('two_factor_authentication.backup_codes.add_another_authentication_option'), second_mfa_setup_path %> | ||
| <% end %> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,18 +58,17 @@ | |
| end | ||
| end | ||
|
|
||
| it 'directs backup code only users to the SP during sign up' do | ||
| it 'directs to SP after backup code confirmation' do | ||
| visit_idp_from_sp_with_ial1(:oidc) | ||
| sign_up_and_set_password | ||
| select_2fa_option('backup_code') | ||
| click_continue | ||
| skip_second_mfa_prompt | ||
|
|
||
| expect(page).to have_current_path(sign_up_completed_path) | ||
| expect(page).to have_current_path(confirm_backup_codes_path) | ||
| acknowledge_backup_code_confirmation | ||
|
|
||
| click_agree_and_continue | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on what I understood, it did not seem to be meaningful. If I am missing something, I would be more than happy to include it back in |
||
|
|
||
| expect(current_url).to start_with('http://localhost:7654/auth/result') | ||
| expect(current_path).to eq(sign_up_completed_path) | ||
| end | ||
|
|
||
| context 'when the user needs a backup code reminder' do | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.