heresy / angular2-social-login-example

angular2-social-login Example
13 stars 17 forks source link

hi , i was unable to chnage the scope on the google auth in this module #6

Open chinna-magapu opened 7 years ago

chinna-magapu commented 7 years ago

i was changed the code in the file node_modules\angular2-social-login\src\angular2-social-login.module.ts

` const loadProvidersScripts: Object = { google: (info: IProvider) => { let d = document, gJs, ref: any = d.getElementsByTagName('script')[0]; gJs = d.createElement('script'); gJs.async = true; gJs.src = "//apis.google.com/js/platform.js";

            gJs.onload = function() {
                gapi.load('auth2', function() {
                    gapi.auth2.init({
                    client_id: info["clientId"],
                   // scope: 'email'
                  scope: 'https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.profile.emails.read https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly'
                    })
                })
            }
            ref.parentNode.insertBefore(gJs, ref);
        }`

but it didnt worked for me

Plz help me to sort this out