7 Replies to “How to Implement Sign-in with Google in Angular and a REST API”

  1. Hello,

    I’m getting an error. Hoping you can help. In my app.module I have this:

    import { SocialLoginModule, AuthServiceConfig, GoogleLoginProvider } from ‘angular-6-social-login’;
    import { getAuthServiceConfigs } from “./socialLoginConfig”;

    providers: [

    Getting an error that says: Property ‘initialize’ does not exist on type ‘typeof SocialLoginModule’.

    Here is my configs:
    import { SocialLoginModule, AuthServiceConfig, GoogleLoginProvider } from ‘angular-6-social-login’;

    export function getAuthServiceConfigs() {
    let config = new AuthServiceConfig([{
    id: GoogleLoginProvider.PROVIDER_ID,
    provider: new GoogleLoginProvider(“my provider has been removed here”)

    return config;

    Any ideas?


    1. in app.module.ts use this code instead:

      providers: [
      {provide: AuthServiceConfig,
      useFactory: getAuthServiceConfigs}

    1. Yes, it does. You have to install the latest version of angularx-social-login which is compatible with Angular 6 and RXJS 6

  2. Nice read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch since I found it for him smile Therefore let me rephrase that: Thanks for lunch!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.