abacritt / angularx-social-login

Social login and authentication module for Angular 17
630 stars 387 forks source link

Thx Bro ,Hey, I found a solution that worked for me. #559

Closed ChemaGomezST closed 1 year ago

ChemaGomezST commented 1 year ago

Hey, I found a solution that worked for me. Inside app.module.ts you have to add the following code in your providers:

providers: [
        {
          id: GoogleLoginProvider.PROVIDER_ID,
          provider: new GoogleLoginProvider(
            'clientId', {
              scope: 'email',
              plugin_name: 'login-app'
            }),
        }
      ], 
      onError: (err: any) => {
        console.error(err);
      },
    } as SocialAuthServiceConfig,
  },
  ],

where plugin_name must be the name you provided for your project in the google oauth api.

Hope this can help someone in need :)

Originally posted by @davidmr163 in https://github.com/abacritt/angularx-social-login/issues/504#issuecomment-1142726408

Heatmanofurioso commented 1 year ago

@ChemaGomezST Want to add a PR documenting this in the Readme?

davidmr163 commented 1 year ago

@ChemaGomezST Want to add a PR documenting this in the Readme?

it would be really helpful

Heatmanofurioso commented 1 year ago

https://github.com/abacritt/angularx-social-login/issues/504#issuecomment-1142726408