sendRequestAuth method
Implementation
Future sendRequestAuth(
String username,
String password,
String dateOfBirth,
) async {
bool ssn = false;
bool accountNumber = false;
bool dob = false;
bool pin = false;
servicer.authSteps[0].authParams.forEach((element) {
if (element.id == "ssn") {
ssn = true;
}
if (element.id == "accountNumber") {
accountNumber = true;
}
if (element.id == "dob") {
dob = true;
}
if (element.id == "pin") {
pin = true;
}
});
sendButtonClicked.value = true;
await usecaseAuth.requestAuth(
RequestAuth(
loginDetails: UserPass(
username: username,
userId: username,
password: password,
pin: pin ? authParams[1].text : null,
dob: dob ? dateOfBirth : null,
ssn: ssn ? authParams[3].text : null,
accountNumber: accountNumber
? authParams[4].text.isNotEmpty
? authParams[4].text
: authParams[3].text
: null,
),
authStep: 'password',
loanServicerId: servicer.id,
extUserID: getSafe<IServiceToken>()?.requestToken?.extUserId,
),
);
sendButtonClicked.value = false;
_onContinueButtonClicked();
}