summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-mod-webauthn/htdocs/luci-static/resources/view/system/webauthn.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/luci-mod-webauthn/htdocs/luci-static/resources/view/system/webauthn.js b/modules/luci-mod-webauthn/htdocs/luci-static/resources/view/system/webauthn.js
index 546e927d17..078f950392 100644
--- a/modules/luci-mod-webauthn/htdocs/luci-static/resources/view/system/webauthn.js
+++ b/modules/luci-mod-webauthn/htdocs/luci-static/resources/view/system/webauthn.js
@@ -8,6 +8,7 @@
const generateRegistrationOptions = rpc.declare({
object: 'webauthn',
method: 'generateRegistrationOptions',
+ params: ['username'],
expect: { '': {} }
});
@@ -72,7 +73,10 @@ return view.extend({
s.addbtntitle = _('Add instance');
s.handleAdd = function(ev, other) {
const m1 = m;
- return generateRegistrationOptions().then(function(options) {
+ // TODO maybe name and user name doesn't need to match
+ // hardcoded
+ const username = 'root';
+ return generateRegistrationOptions(username).then(function(options) {
var m, s, o;
formData.webauthn.name = options.result.user.name;