server/lib/gateway/gateway.loginTwoFactor.js
Function loginTwoFactor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function loginTwoFactor(twoFactorToken, twoFactorCode) {
// We login with two factor code
await this.gladysGatewayClient.loginInstance(twoFactorToken, twoFactorCode);
// we get all variables
const gladysGatewayRefreshToken = await this.variable.getValue('GLADYS_GATEWAY_REFRESH_TOKEN');