72699: Hard redirect after log in - loading fixes

This commit is contained in:
Kristof De Langhe
2020-08-27 14:50:13 +02:00
parent 7fbae8997d
commit 55c45f5f6c
25 changed files with 204 additions and 146 deletions

View File

@@ -13,6 +13,8 @@ import { fadeOut } from '../../../animations/fade';
import { AuthMethodType } from '../../../../core/auth/models/auth.method-type';
import { renderAuthMethodFor } from '../log-in.methods-decorator';
import { AuthMethod } from '../../../../core/auth/models/auth.method';
import { AuthService } from '../../../../core/auth/auth.service';
import { HardRedirectService } from '../../../../core/services/hard-redirect.service';
/**
* /users/sign-in
@@ -66,11 +68,15 @@ export class LogInPasswordComponent implements OnInit {
/**
* @constructor
* @param {AuthMethod} injectedAuthMethodModel
* @param {AuthService} authService
* @param {HardRedirectService} hardRedirectService
* @param {FormBuilder} formBuilder
* @param {Store<State>} store
*/
constructor(
@Inject('authMethodProvider') public injectedAuthMethodModel: AuthMethod,
private authService: AuthService,
private hardRedirectService: HardRedirectService,
private formBuilder: FormBuilder,
private store: Store<CoreState>
) {
@@ -134,6 +140,8 @@ export class LogInPasswordComponent implements OnInit {
email.trim();
password.trim();
this.authService.setRedirectUrlIfNotSet(this.hardRedirectService.getCurrentRoute());
// dispatch AuthenticationAction
this.store.dispatch(new AuthenticateAction(email, password));