vue-google-auth icon indicating copy to clipboard operation
vue-google-auth copied to clipboard

Scopes are overwritten

Open mattmatters opened this issue 7 years ago • 3 comments
trafficstars

config = Object.assign(options, { scope: 'profile email https://www.googleapis.com/auth/plus.login' })

This overwrites any user provided scopes

Changing to config = Object.assign({ scope: 'profile email https://www.googleapis.com/auth/plus.login' }, options) would preserve expected behavior since no one can add scopes anyway, but allow the optional parameter.

mattmatters avatar Dec 20 '17 21:12 mattmatters

did you find a solution for this? I have the same problem. I want to add "google calendar" scope but as you wrote, it's not possible at this time.

darior87 avatar Feb 13 '18 09:02 darior87

Hey darior87!

I just switched the object assign around and it works great for me, I'm using the Google Analytics scope.

This commit does it on my fork. Let me know if that works for you!

mattmatters avatar Feb 13 '18 16:02 mattmatters

Yes, I cloned also this repo and created my own with this fix and it works. thanks to your comment!

darior87 avatar Feb 13 '18 16:02 darior87