sirkitree / angular-directive.g-signin

:triangular_ruler: AngularJS Directive for Google Plus Sign-in Button
http://jeradbitner.com/angular-directive.g-signin/
148 stars 84 forks source link

How to correctly specify various scopes? #31

Closed stefek99 closed 9 years ago

stefek99 commented 9 years ago

(new lines for readability)

Works:

<google-plus-signin 
clientid="..." 
accesstype="offline" 
scope= 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'>
</google-plus-signin>

Doesn't work:

<google-plus-signin 
clientid="..." 
accesstype="offline" 
scope= 'https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.compose https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/contacts.readonly'>
</google-plus-signin>

error_400__oauth2_error___1_and_google_gmail_api

I'll investigate it further but maybe you'll know from top of your head...

stefek99 commented 9 years ago

OK.

Now I see it: https://github.com/sirkitree/angular-directive.g-signin/blob/master/google-plus-signin.js#L27

requestvisibleactions: 'http://schemas.google.com/AddActivity'

Obviously.