rudrakshpathak / angular2-google-login

Google oAuth authentication. This repository implements Google login using Angular2.
MIT License
12 stars 2 forks source link

Two clicks necessary for login #5

Closed gkTim closed 6 years ago

gkTim commented 7 years ago

Hi,

we use your module for facebook login and it works great. Except that the user needs to click two times on the login button to login. The first time the button is clicked only a few files are fetched:

https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.de.wObLpOs26SA.O/m=auth2/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCPoqQVPsEmjbh64D3n5K0kPTFfsEA/cb=gapi.loaded_0

https://accounts.google.com/o/oauth2/iframe

https://ssl.gstatic.com/accounts/o/2836349087-idpiframe.js

The second click then triggers the login.

Is this a known issue?

Greetz Tim

rudrakshpathak commented 7 years ago

Hi Tim,

I'll look into this issue and will resolve it as soon as possible.

Regards , Rudraksh

IuriiKryventsov commented 7 years ago

@gkTim Hi! Try to place this._googleAuth.authenticateUser call in ngOnInit() or constructor.

skavinvarnan commented 6 years ago

@IuriiKryventsov still it doesn't work

joe455 commented 6 years ago

same issue for me too :(

joe455 commented 6 years ago

@IuriiKryventsov Thanks..It did the trick!!!