1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2025-03-11 04:58:21 +03:00

Fixed mfa page to not repeat if user is already logged in

This commit is contained in:
Adolfo Gómez García 2022-06-24 13:26:15 +02:00
parent 1f394e79ab
commit e3b4bdf501

View File

@ -17,6 +17,11 @@ export class MfaComponent implements OnInit {
const form = document.getElementById('mfaform') as HTMLFormElement;
form.action = this.api.config.urls.mfa;
// if the user is already logged in, we redirect him to /
if (this.api.user.isLogged) {
this.api.router.navigate(['/']);
}
if (this.api.errors.length > 0) {
this.api.gui.alert(
django.gettext('Errors found'),