Social Login for all Typescript Projects like Angular 2 & above, reactJS, VueJS etc ..,
Social login and authentication which supports authentication with Google and Facebook platforms.
Getting started
Install via npm
npm install social-login-oauth --save
Usage
; @ { } { GoogleService } { GoogleService } : void FacebookService { FacebookService } : void //if revoke is true, it will be disconnected instead of signout. GoogleService; : void FacebookService;
Possible fields get after the Social login.
id: string; email: string; name: string; photoUrl: string; firstName: string; lastName: string; authToken: string; idToken?: string; authorizationCode?: string; provider?: string; facebook?: any; linkedIn?: any;
Specifying custom scope
For Google
const googleLoginOptions: LoginOpt = scope: 'profile email'; // https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauth2clientconfig GoogleService
For Facebook
const fbLoginOptions: LoginOpt = scope: 'pages_messaging,pages_messaging_subscriptions,email,pages_show_list,manage_pages' return_scopes: true enable_profile_selector: true; // https://developers.facebook.com/docs/reference/javascript/FB.login/v2.11 FacebookService