abacritt / angularx-social-login

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

Uncaught (in promise): Login provider not found #526

Closed rahulkutah closed 1 year ago

rahulkutah commented 2 years ago

I have installed version1.2.0. As soon as hit the login button it says Uncaught (in promise): Login provider not found.

App Module -

@NgModule({
    declarations: [AppComponent],
    imports: [
        BrowserModule,
        AppRoutingModule,
        SocialLoginModule,
        BrowserAnimationsModule
    ],
    providers: [
        {
            provide: 'SocialAuthServiceConfig',
            useValue: {
                providers: [
                    {
                        id: GoogleLoginProvider.PROVIDER_ID,
                        provider: new GoogleLoginProvider(
                            environment.googleClientId
                        )
                    }
                ]
            } as SocialAuthServiceConfig
        }
    ],
    bootstrap: [AppComponent]
})
export class AppModule {}

Component:

signUpWithGoogle(event: Event): void {
      this._socialAuthService
          .signIn(GoogleLoginProvider.PROVIDER_ID)
          .then((user) => {
              console.log('GoogleContainerComponent.ngOnInit user:', user);
          });
}
Heatmanofurioso commented 2 years ago

Hi @rahulkutah Can you check out V1.2.1, please?

rahulkutah commented 2 years ago

Hi, @Heatmanofurioso , version 1.2.1 works. Is there any way to customize the google login button? Like we have in the previous versions we can be able to attach custom click handlers.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.