Adds 2 factor authentication method via second factor security keys over [web authn](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API). Allows a user to authenticate a second factor on login, login-via-email, admin-login, and change password routes. Adds registration area within existing user second factor preferences to register multiple security keys. Supports both external (yubikey) and built-in (macOS/android fingerprint readers).
12 lines
306 B
JavaScript
12 lines
306 B
JavaScript
import { SECOND_FACTOR_METHODS } from "discourse/models/user";
|
|
|
|
export default Ember.Component.extend({
|
|
actions: {
|
|
useAnotherMethod() {
|
|
this.set("showSecurityKey", false);
|
|
this.set("showSecondFactor", true);
|
|
this.set("secondFactorMethod", SECOND_FACTOR_METHODS.TOTP);
|
|
}
|
|
}
|
|
});
|