Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit dc3bb90

Browse files
authored
Merge pull request #97 from silinternational/feature/check-u2f-support
Check U2F support
2 parents 0ef8a4a + 8a9b760 commit dc3bb90

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

local.env.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ MFA_U2F_apiSecret=
88
MFA_U2F_appId=
99

1010
### Optional ENV vars ###
11-
LOGENTRIES_KEY=
1211
COMPOSER_AUTH=
1312

1413
REMOTE_DEBUG_IP=

themes/material/mfa/prompt-for-mfa-u2f.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ function createHiddenInput(name) {
8787
</script>
8888
</head>
8989

90-
<body class="gradient-bg" onload="verifyU2f()">
90+
<?php $isU2fSupported = $this->data['supportsU2f']; ?>
91+
92+
<body class="gradient-bg" onload="<?= $isU2fSupported ? 'verifyU2f()' : '' ?>">
9193
<div class="mdl-layout mdl-layout--fixed-header fill-viewport">
9294
<header class="mdl-layout__header">
9395
<div class="mdl-layout__header-row">
@@ -111,11 +113,19 @@ class="icon">
111113
</h1>
112114
</div>
113115

116+
<?php if ($isU2fSupported): ?>
114117
<div class="mdl-card__title">
115118
<p class="mdl-card__subtitle-text">
116119
<?= $this->t('{material:mfa:u2f_instructions}') ?>
117120
</p>
118121
</div>
122+
<?php else: ?>
123+
<div class="mdl-card__title">
124+
<p class="mdl-typography--text-center mdl-color-text--red">
125+
<?= $this->t('{material:mfa:u2f_unsupported}') ?>
126+
</p>
127+
</div>
128+
<?php endif; ?>
119129

120130
<?php
121131
$message = $this->data['errorMessage'];

0 commit comments

Comments
 (0)