Add flag to completely disable multi-factor authentication for a given account
This commit is contained in:
parent
908b855948
commit
7e7d6c770c
|
@ -231,6 +231,9 @@ export class Auth extends Serializable implements Storable {
|
||||||
@AsSerializable(PBES2Container)
|
@AsSerializable(PBES2Container)
|
||||||
legacyData?: PBES2Container;
|
legacyData?: PBES2Container;
|
||||||
|
|
||||||
|
/** Completely disables mfa for a given account. Only use for testing! */
|
||||||
|
disableMFA = false;
|
||||||
|
|
||||||
constructor(public email: string = "") {
|
constructor(public email: string = "") {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,7 +355,8 @@ export class Controller extends API {
|
||||||
auth.authRequests.push(request);
|
auth.authRequests.push(request);
|
||||||
|
|
||||||
const deviceTrusted =
|
const deviceTrusted =
|
||||||
this.context.device && auth.trustedDevices.some(({ id }) => id === this.context.device!.id);
|
auth.disableMFA ||
|
||||||
|
(this.context.device && auth.trustedDevices.some(({ id }) => id === this.context.device!.id));
|
||||||
|
|
||||||
const response = new StartAuthRequestResponse({
|
const response = new StartAuthRequestResponse({
|
||||||
id: request.id,
|
id: request.id,
|
||||||
|
|
Loading…
Reference in New Issue