christiansmith / ngGAPI

AngularJS Google API Client
MIT License
113 stars 40 forks source link

First time clicking button to do oauth triggers pop-up blocker #3

Open warnero opened 10 years ago

warnero commented 10 years ago

Not sure why this is happening, but this would be awful for our users to experience. Any tips on getting it to work properly the first time they click auth?

$scope.authorize = function () { var promise = GAPI.init(); promise.then(function(data){ console.log("data", data); var googleUser = Plus.searchPeople('me'); console.log("googleUser", googleUser); }); };

christiansmith commented 10 years ago

Thanks for the issue. Which browser are you using? I understand what's happening, but I haven't been able to reproduce that behavior on my machine.

One thing you can do is acquire the credentials elsewhere and set them as GAPI.app.oauthToken.

warnero commented 10 years ago

I managed to patch by doing an implicit load on it first. Ended up switching to full api auth as I needed the refresh token and not just the auth token.

-warner

On Wed, Aug 6, 2014 at 11:17 AM, Christian Smith notifications@github.com wrote:

Thanks for the issue. Which browser are you using? I understand what's happening, but I haven't been able to reproduce that behavior on my machine.

One thing you can do is acquire the credentials elsewhere and set them as GAPI.app.oauthToken.

— Reply to this email directly or view it on GitHub https://github.com/christiansmith/ngGAPI/issues/3#issuecomment-51374723.