import { Component, Input, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { AuthService } from '@app/core/services/auth/auth.service'; import { BaseComponent } from '@common/base/base.component'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.scss'] }) export class LoginComponent extends BaseComponent implements OnInit { @Input() redirect: boolean = true; @Input() mergeUsers: boolean; public auth2: any; private returnUrl: string; //public cofigurableProviders: ConfigurableProvider[]; constructor( private authService: AuthService, private route: ActivatedRoute ) { super(); } ngOnInit(): void { this.returnUrl = this.route.snapshot.queryParamMap.get('returnUrl') || '/'; this.authService.authenticate(this.returnUrl ? this.returnUrl : "/"); } }