mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
react to two factor changes in auth apis
This commit is contained in:
@@ -12,10 +12,10 @@ var FolderRequest = function (folder) {
|
||||
this.name = folder.name ? folder.name.encryptedString : null;
|
||||
};
|
||||
|
||||
var TokenRequest = function (email, masterPasswordHash, code, device) {
|
||||
var TokenRequest = function (email, masterPasswordHash, token, device) {
|
||||
this.email = email;
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.code = code;
|
||||
this.token = token;
|
||||
this.provider = 'Authenticator';
|
||||
this.device = null;
|
||||
if (device) {
|
||||
@@ -38,8 +38,8 @@ var TokenRequest = function (email, masterPasswordHash, code, device) {
|
||||
obj.devicePushToken = this.device.pushToken;
|
||||
}
|
||||
|
||||
if (this.code && this.provider) {
|
||||
obj.twoFactorCode = this.code;
|
||||
if (this.token && this.provider) {
|
||||
obj.twoFactorToken = this.token;
|
||||
obj.twoFactorProvider = this.provider;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user