diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2024-12-05 22:57:09 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2024-12-07 21:32:19 +0100 |
commit | 5e8dda406e0c15ba912c480943ffd32194314163 (patch) | |
tree | 0322e562f31c7ccf450b3e21b5cdff07ef217c9b | |
parent | 26f27b1849e4a98c559242835fb7ced8b5fe7263 (diff) |
luci-mod-webauthn: WIPwip-webauthn
-rw-r--r-- | modules/luci-mod-webauthn/htdocs/luci-static/resources/view/system/webauthn.js | 6 |
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; |