-
Notifications
You must be signed in to change notification settings - Fork 184
Alternative to #741 - Autosubmit Tweak #820
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
base: master
Are you sure you want to change the base?
Changes from all commits
e17c5b3
1fada25
23b8907
698c7a5
e9b935d
4659913
18732c9
3d3b67e
25cea8e
d632012
11f8a94
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -774,6 +774,10 @@ public function is_available_for_user( $user ) { | |||||||||||||||||
| * @codeCoverageIgnore | ||||||||||||||||||
| */ | ||||||||||||||||||
| public function authentication_page( $user ) { | ||||||||||||||||||
|
|
||||||||||||||||||
| /** This filter is documented in providers/class-two-factor-backup-codes.php */ | ||||||||||||||||||
| $code_length = apply_filters( 'two_factor_autosubmit_length', self::DEFAULT_DIGIT_COUNT, $this ); | ||||||||||||||||||
|
|
||||||||||||||||||
| require_once ABSPATH . '/wp-admin/includes/template.php'; | ||||||||||||||||||
| ?> | ||||||||||||||||||
| <?php | ||||||||||||||||||
|
|
@@ -789,7 +793,7 @@ public function authentication_page( $user ) { | |||||||||||||||||
| ?> | ||||||||||||||||||
| <p> | ||||||||||||||||||
| <label for="authcode"><?php esc_html_e( 'Authentication Code:', 'two-factor' ); ?></label> | ||||||||||||||||||
| <input type="text" inputmode="numeric" name="authcode" id="authcode" class="input authcode" value="" size="20" pattern="[0-9 ]*" placeholder="123 456" autocomplete="one-time-code" data-digits="<?php echo esc_attr( self::DEFAULT_DIGIT_COUNT ); ?>" /> | ||||||||||||||||||
| <input type="text" inputmode="numeric" name="authcode" id="authcode" class="input authcode" value="" size="20" pattern="[0-9 ]*" placeholder="123 456" autocomplete="one-time-code" data-digits="<?php echo esc_attr( $code_length ); ?>" /> | ||||||||||||||||||
|
Collaborator
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.
Suggested change
I think we probably should work a bit on the placeholder as well. the space in between 3 and 4 doesnt make sense. additionally based on the code_length we could also generate this also dynamically. BTW the spacing after entering the numbers manually i dont feel its a great UX - what do you think?: two-factor/providers/js/two-factor-login-authcode.js Lines 16 to 21 in cbc73d5
Collaborator
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. The spacing is specifically for UX. My understanding is that studies have shown (and my own experience verified) that it is far easier to remember two groups of three digits, than a six digit number. |
||||||||||||||||||
| </p> | ||||||||||||||||||
| <?php | ||||||||||||||||||
| /** This action is documented in providers/class-two-factor-backup-codes.php */ | ||||||||||||||||||
|
|
||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.