File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed
TwoFactorAuth/view/adminhtml/web Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ define([
8484 */
8585 waitForTouch : function ( ) {
8686 this . idle ( false ) ;
87+ if ( ! navigator . credentials ) {
88+ this . currentStep ( "no-webauthn" ) ;
89+ return ;
90+ }
8791 navigator . credentials . get ( {
8892 publicKey : this . authenticateData . credentialRequestOptions
8993 } )
Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ define([
7878 */
7979 waitForTouch : function ( ) {
8080 this . idle ( false ) ;
81+ if ( ! navigator . credentials ) {
82+ this . currentStep ( "no-webauthn" ) ;
83+ return ;
84+ }
8185 navigator . credentials . create ( {
8286 publicKey : this . registerData . publicKey
8387 } )
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ <h3 translate="'Plug in your U2F key and follow instructions'"></h3>
2727 </ div >
2828 < div translate ="'Redirecting to Magento Admin Panel...' "> </ div >
2929 </ div >
30+ < div visible ='currentStep() === "no-webauthn" '
31+ translate ="'Error! Your browser does not support WebAuthn or you are not using a secure connection' "
32+ >
33+ </ div >
3034 < div visible ='$data.loading ' class ="tfa-waitbox ">
3135 < div data-role ="spinner ">
3236 < div class ="spinner ">
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ <h3 translate="'Plug in your U2F key and follow instructions'"></h3>
2727 </ div >
2828 < div translate ="'Redirecting to Magento Admin Panel...' "> </ div >
2929 </ div >
30+ < div visible ='currentStep() === "no-webauthn" '
31+ translate ="'Error! Your browser does not support WebAuthn or you are not using a secure connection' "
32+ >
33+ </ div >
3034 < div visible ='$data.loading ' class ="tfa-waitbox ">
3135 < div data-role ="spinner ">
3236 < div class ="spinner ">
You can’t perform that action at this time.
0 commit comments