February 2019
Beginner
694 pages
18h 4m
English
The process of integrating the Angular social login library is not a difficult one, and is broken down into two parts. Firstly, we will need to configure a provider, and secondly, we will need to use this provider to obtain a user token. The various social providers are all configured as services, and, as such, require modifications to the app.module.ts file as follows:
import { SocialLoginModule, AuthServiceConfig, GoogleLoginProvider } from 'angular-6-social-login-v2'; export function getAuthServiceConfig(): AuthServiceConfig { let config = new AuthServiceConfig([{ id: GoogleLoginProvider.PROVIDER_ID, provider: new GoogleLoginProvider(`<your client id goes here>`) }]); return config; } @NgModule({ declarations: ...Read now
Unlock full access