Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular x social login

 import { SocialAuthService } from "angularx-social-login";import { FacebookLoginProvider, GoogleLoginProvider } from "angularx-social-login"; @Component({  selector: 'app-demo',  templateUrl: './demo.component.html',  styleUrls: ['./demo.component.css']})export class DemoComponent implements OnInit {   constructor(private authService: SocialAuthService) { }   signInWithGoogle(): void {    this.authService.signIn(GoogleLoginProvider.PROVIDER_ID);  }   signInWithFB(): void {    this.authService.signIn(FacebookLoginProvider.PROVIDER_ID);  }   signOut(): void {    this.authService.signOut();  } }
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #angular #social #login
ADD COMMENT
Topic
Name
4+6 =