This is social login API for Angular 7.0.3 (Facebook, Google and Linkedin)
Big thanks to https://github.com/sabyasachibiswal/angular5-social-login . Since They do not support angular 7+ I have modified their source code and published it here to help others.
Getting Started
Install package via npm installer
npm install ng-dynami-social-login
Import the module
In app.module.ts
... ;; ;; { let config = id: FacebookLoginProviderPROVIDER_ID provider: "XXXXXX" id: GoogleLoginProviderPROVIDER_ID provider: "XXXxXXXX.apps.googleusercontent.com" id: LinkedinLoginProviderPROVIDER_ID provider: "XXXXXXXxXX" ; return config;} @
In login.component.html
Sign in Sign in with FacebookSignin in with Google
In login.componentng g c logo.ts
... ;; @ implements OnInit { } { } public { let socialPlatformProvider; ifsocialPlatform == "facebook" socialPlatformProvider = FacebookLoginProviderPROVIDER_ID; else ifsocialPlatform == "google" socialPlatformProvider = GoogleLoginProviderPROVIDER_ID; else if socialPlatform == "linkedin" socialPlatformProvider = LinkedinLoginProviderPROVIDER_ID; thissocialAuthService; }
Facebook App Id :
You need to create your own facebook app by going to Facebook Developers page.
Add Facebook login
under products and configure Valid OAuth redirect URIs
.
Google Client Id :
Follow this official documentation on how to Create a Google API Console project and client ID.