-
Notifications
You must be signed in to change notification settings - Fork 270
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
Feature enable otp #201
Open
experian-greg-myers
wants to merge
32
commits into
Houdini:master
Choose a base branch
from
experian-greg-myers:feature-enable-otp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature enable otp #201
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
cbc4802
Update to new ruby syntax and styleguide
8e5eff3
Update for style guides
6ead3f0
Add new and create method to add a totp code via QR
20a4348
Add issuer to config to set issuer via provisioning_uri
de4e6a1
Add db column for otp enabled status
a4df525
Change routing by adding verify path and using edit/update to disable…
c2ab97a
Update creating and updating otp on user
6a7ec62
Add routing to new_user_two_factor_authentication if otp is not enabl…
5bb1c3f
Rename set_qr method and remove unused settings
6cbcf54
Add enable, confirm and disable methods
f3517e3
Updat readme for new functionalities
4b71f78
Add view generator and documentate in readme
7522c8b
Update test for new database field
157668e
Remove issuer option
3bdcddd
Update controller spec for verify route instead of update
f376e55
Fix test for added otp_enabled attribute
a228c03
Add feature and controller tests
497f0c3
Refactor routes resources
f498782
Fix test for new otp_enabled field
de509bc
Add notice for successful disable of tfa
db9cb88
Save changes after enabling and disabling otp
f6e182d
Remove commented code
965a07b
Fix merge conflict
3c4ddc9
Merge branch 'Houdini-master' into feature-enable-otp
17bd00a
Update edit view
ee49a93
Merge branch 'master' into feature-enable-otp
BookOfGreg 24fe7d9
Update readme
BookOfGreg 30bce03
Remigrate the DB
BookOfGreg 00b273d
Support rails migration versions
BookOfGreg e935492
Fixes #169 rotp returning url encoded at
BookOfGreg fff94dc
Merge branch 'fix-169-rotp-v5' into feature-enable-otp
BookOfGreg e6844bc
Refactor to upgrade specs to rails 4 and 5 compatibility
BookOfGreg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--color | ||
--format documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h2>Disable two-factor authentication</h2> | ||
|
||
<p><%= flash[:notice] %></p> | ||
|
||
<%= form_tag([resource_name, :two_factor_authentication], method: 'PUT') do %> | ||
<%= text_field_tag :code, nil, placeholder: 'Enter code', autocomplete: 'off' %> | ||
|
||
<%= submit_tag 'Confirm and deactivate' %> | ||
<% end %> | ||
|
||
<br><br> | ||
<%= link_to 'Send me a code instead', resend_code_user_two_factor_authentication_path, remote: true %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<h2>Enable two-factor authentication</h2> | ||
|
||
<p><%= flash[:notice] %></p> | ||
|
||
<h3>Authentication with an app</h3> | ||
|
||
<h5>Get the app</h5> | ||
<p> | ||
Download and install one of the following apps for your phone or table:<br> | ||
- Google Authenticator<br> | ||
- Duo Mobile<br> | ||
- Authy<br> | ||
- Windows Phone Authenticator | ||
</p> | ||
|
||
<h4>Scan this barcode</h4> | ||
<%= image_tag @qr %> | ||
<p> | ||
Open the authentication app and:<br> | ||
- Tap the "+" icon in the top-right of the app<br> | ||
- Scan the image to the left, using your phone's camera<br> | ||
<br> | ||
<b>Can't scan this barcode?</b><br> | ||
Instead of scanning, use your authentication app's "Manual entry" or equivalent option and provide the following time-based key.<br> | ||
<br> | ||
<b><i id='totp_secret'><%= @totp_secret %></i></b><br> | ||
<br> | ||
Your app will then generate a 6-digit verification code, which you use below. | ||
</p> | ||
|
||
<h3>Authentication via code</h3> | ||
|
||
<%= link_to 'Send me a code instead', resend_code_user_two_factor_authentication_path, remote: true %> | ||
<br><br> | ||
|
||
<%= form_tag([resource_name, :two_factor_authentication]) do %> | ||
<%= text_field_tag :code, nil, placeholder: 'Enter code', autocomplete: 'off' %> | ||
<%= hidden_field_tag :totp_secret, @totp_secret %> | ||
|
||
<%= submit_tag 'Confirm and activate' %> | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
<p><%= flash[:notice] %></p> | ||
|
||
<%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %> | ||
<%= form_tag(verify_user_two_factor_authentication_path, method: :put) do %> | ||
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. Method name is not generic in this PR, seems to be locked to user for now. |
||
<%= text_field_tag :code, '', autofocus: true %> | ||
<%= submit_tag "Submit" %> | ||
<% end %> | ||
|
@@ -16,4 +16,6 @@ | |
<% else %> | ||
<%= link_to "Send me a code instead", send("resend_code_#{resource_name}_two_factor_authentication_path"), action: :get %> | ||
<% end %> | ||
|
||
<br> | ||
<%= link_to "Sign out", send("destroy_#{resource_name}_session_path"), :method => :delete %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sprockets 3 requires a manifest, pegged sprockets to 2 for duration of this branch so the manifest can be fixed separately.