Verwenden der FB -Anmeldung mit Angular App
import { AuthService, FacebookLoginProvider, SocialUser } from 'angularx-social-login';
Sleepy Spider
import { AuthService, FacebookLoginProvider, SocialUser } from 'angularx-social-login';
signInWithFB(): void {
this.authService.signIn(FacebookLoginProvider.PROVIDER_ID);
}
signOut(): void {
this.authService.signOut();
}
export class AppComponent implements OnInit {
...
}
ngOnInit() {
this.authService.authState.subscribe((user) => {
this.user = user;
this.loggedIn = (user != null);
console.log(this.user);
});
}