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([
84
84
*/
85
85
waitForTouch : function ( ) {
86
86
this . idle ( false ) ;
87
+ if ( ! navigator . credentials ) {
88
+ this . currentStep ( "no-webauthn" ) ;
89
+ return ;
90
+ }
87
91
navigator . credentials . get ( {
88
92
publicKey : this . authenticateData . credentialRequestOptions
89
93
} )
Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ define([
78
78
*/
79
79
waitForTouch : function ( ) {
80
80
this . idle ( false ) ;
81
+ if ( ! navigator . credentials ) {
82
+ this . currentStep ( "no-webauthn" ) ;
83
+ return ;
84
+ }
81
85
navigator . credentials . create ( {
82
86
publicKey : this . registerData . publicKey
83
87
} )
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>
27
27
</ div >
28
28
< div translate ="'Redirecting to Magento Admin Panel...' "> </ div >
29
29
</ 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 >
30
34
< div visible ='$data.loading ' class ="tfa-waitbox ">
31
35
< div data-role ="spinner ">
32
36
< 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>
27
27
</ div >
28
28
< div translate ="'Redirecting to Magento Admin Panel...' "> </ div >
29
29
</ 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 >
30
34
< div visible ='$data.loading ' class ="tfa-waitbox ">
31
35
< div data-role ="spinner ">
32
36
< div class ="spinner ">
You can’t perform that action at this time.
0 commit comments