angularx-social-login icon indicating copy to clipboard operation
angularx-social-login copied to clipboard

Why are we loading Google login without the user's consent?

Open tawani opened this issue 3 years ago • 5 comments

Why are we loading Google login without the user's consent? I need the user to explicitly click on their social login button. How can we do that?

tawani avatar Jun 23 '22 01:06 tawani

I don't know if it's the same issue, but when I'm logged in with google, the popup from google that asks to login with google still appears, it shouldn't.

obrador avatar Jul 19 '22 16:07 obrador

Same issue here, I was performing logout and as soon as I redirected to login page the popup comes up, is there any workaround for this? thanks!

BruneXX avatar Jul 21 '22 23:07 BruneXX

Same here

The Google login appears automatically only by injecting SocialAuthService into a constructor

There is nothing in the documentation that helps me disable that behaviour

I need to launch the Google login modal when I call it to do so

sterichards avatar Jul 22 '22 11:07 sterichards

This is a bit of a hack, but I set the prompt_parent_id in initOptions to point to a div with display: none; to hide the prompt from the user. Hopefully PR https://github.com/abacritt/angularx-social-login/pull/588 will solve this.

Edit: this isn't recommended apparently and can get your account suspended and also doesn't work on mobile screen resolutions.

gaessaki avatar Aug 31 '22 23:08 gaessaki

Try defining "googleLoginOptions" with param "oneTapEnabled" set to "false" when defining the provider in AppModule:

const googleLoginOptions: GoogleInitOptions = {
  oneTapEnabled: false, // default is true
};

  ...
  providers: [
    {
      provide: 'SocialAuthServiceConfig',
      useValue: {
        autoLogin: false,
        providers: [
          {
            id: GoogleLoginProvider.PROVIDER_ID,
            provider: new GoogleLoginProvider(
              environment.google.token,
              googleLoginOptions
            ),
          },
        ],
        onError: (err) => {
          console.error(err);
        },
      } as SocialAuthServiceConfig,
    },
  ],
  ...

gapablaza avatar Sep 05 '22 04:09 gapablaza

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.

stale[bot] avatar Nov 12 '22 05:11 stale[bot]