ng4 Social Login
This is the refrenced library from angular4-social-login.
Social login and authentication module for Angular 4. Supports authentication with Google, Linkedin and Facebook.
Getting started
Documentation
check out Docs
Install via npm
npm install --save ng4-social-login
Import the module
In your AppModule
, import the SocialLoginModule
; const CONFIG = id: GoogleLoginProviderPROVIDER_ID provider: 'Google-OAuth-Client-Id' id: FacebookLoginProviderPROVIDER_ID provider: 'Facebook-App-Id' id: LinkedinLoginProviderPROVIDER_ID provider: 'LINKEDIN_CLIENT_ID' ; { return CONFIG;} @
Sign in and out users
; @ implements OnInit { } : void thisauthService; : void thisauthService; : void thisauthService; : void thisauthService;
Subscribe to the authentication state
You are notified when user logs in or logs out. You receive a SocialUser
object when the user logs in and a null
when the user logs out. SocialUser
object contains basic user information such as name, email, photo URL, etc.
;; @ implements OnInit private user: SocialUser; private loggedIn: boolean; { } { thisauthServiceauthState; }
Display the user information
{{ user.name }} {{ user.email }}
Building with AoT
If you are facing issue in building your app with AoT, check this document.
Contributing to project
you are welcome to report an issue or creating a pull request.