2fa properties on user

This commit is contained in:
Erik 2022-11-11 21:35:35 +02:00
parent 275a7ffdcd
commit c56e4969d0
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -29,6 +29,8 @@ class User {
/** @private */
this._passwordHash = data.password || null;
this._otpSecret = data.otpSecret || null;
this._2fa = data.twoFactor || false;
this.cachedTimestamp = Date.now();
@ -98,7 +100,9 @@ class User {
type: this.type,
permissions: this.permissions,
externalProfiles: this.externalProfiles,
password: this._passwordHash
password: this._passwordHash,
otpSecret: this._otpSecret,
twoFactor: this._2fa,
};
}