pass email param on login/register
This commit is contained in:
parent
6db55bbae8
commit
b3bd13fe2b
|
@ -27,7 +27,8 @@ export class LoginComponent implements OnInit {
|
||||||
masterPassword: string = '';
|
masterPassword: string = '';
|
||||||
showPassword: boolean = false;
|
showPassword: boolean = false;
|
||||||
formPromise: Promise<AuthResult>;
|
formPromise: Promise<AuthResult>;
|
||||||
onSuccessfullLogin: () => Promise<any>;
|
onSuccessfulLogin: () => Promise<any>;
|
||||||
|
onSuccessfulLoginNavigate: () => Promise<any>;
|
||||||
|
|
||||||
protected twoFactorRoute = '2fa';
|
protected twoFactorRoute = '2fa';
|
||||||
protected successRoute = 'vault';
|
protected successRoute = 'vault';
|
||||||
|
@ -82,12 +83,16 @@ export class LoginComponent implements OnInit {
|
||||||
this.analytics.eventTrack.next({ action: 'Logged In To Two-step' });
|
this.analytics.eventTrack.next({ action: 'Logged In To Two-step' });
|
||||||
this.router.navigate([this.twoFactorRoute]);
|
this.router.navigate([this.twoFactorRoute]);
|
||||||
} else {
|
} else {
|
||||||
if (this.onSuccessfullLogin != null) {
|
if (this.onSuccessfulLogin != null) {
|
||||||
this.onSuccessfullLogin();
|
this.onSuccessfulLogin();
|
||||||
}
|
}
|
||||||
this.analytics.eventTrack.next({ action: 'Logged In' });
|
this.analytics.eventTrack.next({ action: 'Logged In' });
|
||||||
|
if (this.onSuccessfulLoginNavigate != null) {
|
||||||
|
this.onSuccessfulLoginNavigate();
|
||||||
|
} else {
|
||||||
this.router.navigate([this.successRoute]);
|
this.router.navigate([this.successRoute]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ export class RegisterComponent {
|
||||||
await this.formPromise;
|
await this.formPromise;
|
||||||
this.analytics.eventTrack.next({ action: 'Registered' });
|
this.analytics.eventTrack.next({ action: 'Registered' });
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('newAccountCreated'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('newAccountCreated'));
|
||||||
this.router.navigate([this.successRoute]);
|
this.router.navigate([this.successRoute], { queryParams: { email: this.email } });
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue