Added configurable warning message

This commit is contained in:
Dániel Gyenizse
2023-10-30 16:50:49 +01:00
committed by Adam Saghy
parent cee57c525e
commit 53bbe13603
9 changed files with 65 additions and 2 deletions
@@ -39,6 +39,7 @@ export class AuthenticationService {
/** User credentials. */
private credentials: Credentials;
private dialogShown = false;
/** Key to store credentials in storage. */
private credentialsStorageKey = 'mifosXCredentials';
/** Key to store oauth token details in storage. */
@@ -202,6 +203,7 @@ export class AuthenticationService {
}
this.authenticationInterceptor.removeAuthorization();
this.setCredentials();
this.resetDialog();
return of(true);
}
@@ -266,6 +268,18 @@ export class AuthenticationService {
return this.http.get('/twofactor');
}
showDialog() {
this.dialogShown = true;
}
resetDialog() {
this.dialogShown = false;
}
hasDialogBeenShown() {
return this.dialogShown;
}
/**
* Requests OTP to be sent via the given delivery method.
* @param {any} deliveryMethod Delivery method for the OTP.