34 lines
864 B
TypeScript
34 lines
864 B
TypeScript
import { Component, Input, OnInit } from '@angular/core';
|
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
|
import { BaseComponent } from '@common/base/base.component';
|
|
|
|
/// <reference types="gapi" />
|
|
/// <reference types="facebook-js-sdk" />
|
|
|
|
declare const gapi: any;
|
|
declare const FB: any;
|
|
|
|
@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,
|
|
) { super(); }
|
|
|
|
ngOnInit(): void {
|
|
const returnUrL = this.returnUrl;
|
|
this.authService.authenticate(returnUrL ? returnUrL : "/");
|
|
}
|
|
}
|