From 3d6908b7ec81426674395e37afb3b14657bda167 Mon Sep 17 00:00:00 2001 From: Garrett Mills Date: Tue, 24 Jan 2023 18:00:32 -0600 Subject: [PATCH] First steps for webauthn --- app/assets/app/dash/profile/EditProfile.component.js | 10 +++++++++- locale/en_US/authn.locale.js | 5 +++++ package.json | 1 + yarn.lock | 5 +++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 locale/en_US/authn.locale.js diff --git a/app/assets/app/dash/profile/EditProfile.component.js b/app/assets/app/dash/profile/EditProfile.component.js index 603cd67..bf3238f 100644 --- a/app/assets/app/dash/profile/EditProfile.component.js +++ b/app/assets/app/dash/profile/EditProfile.component.js @@ -104,6 +104,11 @@ const template = ` @click="change_password" >{{ t['password.change'] }} +
  • +

    {{ t['authn.authn'] }}

    +

    {{ t['authn.desc'].replace(/APP_NAME/g, app_name) }}

    + +
  • {{ t['mfa.mfa'] }}

    {{ t['profile.mfa_1'].replace(/APP_NAME/g, app_name) }}

    @@ -291,7 +296,10 @@ export default class EditProfileComponent extends Component { 'profile.advanced_header', 'profile.advanced_shell', 'profile.accessed', - 'common.never' + 'common.never', + 'authn.authn', + 'authn.desc', + 'authn.enable', ) this.app_name = session.get('app.name') diff --git a/locale/en_US/authn.locale.js b/locale/en_US/authn.locale.js new file mode 100644 index 0000000..7077e4a --- /dev/null +++ b/locale/en_US/authn.locale.js @@ -0,0 +1,5 @@ +module.exports = exports = { + authn: 'Biometric/Hardware Authentication', + enable: 'Setup Hardware Login', + desc: 'On supported devices, you can log into your APP_NAME account using a hardware token or biometric sensor such as your phone\'s fingerprint reader.', +} diff --git a/package.json b/package.json index 9aa081b..4286c5e 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "license": "MIT", "dependencies": { "@coreid/radius-server": "^2.2.2", + "@passwordless-id/webauthn": "^1.2.0", "bullmq": "^1.8.8", "email-validator": "^2.0.4", "flitter-auth": "^0.19.6", diff --git a/yarn.lock b/yarn.lock index 4b9a9c5..3a360b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -318,6 +318,11 @@ resolved "https://registry.yarnpkg.com/@panva/asn1.js/-/asn1.js-1.0.0.tgz#dd55ae7b8129e02049f009408b97c61ccf9032f6" integrity sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw== +"@passwordless-id/webauthn@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@passwordless-id/webauthn/-/webauthn-1.2.0.tgz#5f0f921eb370b21058b6074929fcc540f5b452af" + integrity sha512-2MQjaiGqRzUKlLBrq1JK5u2NZMJqDjbzAfKnCIUEF8HaVHF9uL88DQGzrEE0A+4oUV8uyK9xgVHyhnqGSVIhfQ== + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"