meedan / montage

A collaborative video annotation app
https://montage.meedan.com
Other
8 stars 3 forks source link

Ensure Google+ APIs are not used #36

Closed caiosba closed 5 years ago

caiosba commented 5 years ago

On March 7, 2019, all Google+ APIs and Google+ Sign-in will be shut down completely. This will be a progressive shutdown beginning in late January, with calls to these APIs starting to intermittently fail as early as January 28, 2019.

In our case, we're using it in one place: https://github.com/meedan/montage/blob/develop/appengine/src/greenday_public/static-dev/js/services/user.service.js#L190.

mhamzawey commented 5 years ago

@caiosba I found a couple of google_plus_profile as of https://github.com/meedan/montage/blob/b63219fc31d4889f908fff7f98b20152c19a154a/appengine/src/greenday_public/static-dev/js/services/user.service.js#L178

and we are depending on it in this if statement https://github.com/meedan/montage/blob/b63219fc31d4889f908fff7f98b20152c19a154a/appengine/src/greenday_public/static-dev/js/services/user.service.js#L188

Do we depend on google plus profile heavily?

regarding this: https://github.com/meedan/montage/blob/b63219fc31d4889f908fff7f98b20152c19a154a/appengine/src/greenday_public/static-dev/js/services/user.service.js#L190

I am not familiar with google plus apis, but can you please let me know if we followed this It might fix it?

caiosba commented 5 years ago

@mhamzawey AFAIK we call Google Plus API in order to get user information to be saved in his profile. I think a good approach for this issue is to try to find out which information we get today from Google Plus (e.g., by inspecting what is returned by https://github.com/meedan/montage/blob/b63219fc31d4889f908fff7f98b20152c19a154a/appengine/src/greenday_public/static-dev/js/services/user.service.js#L190), how we save it in the profile and then replace it by the equivalent call to the new Google API, as per the last link you pasted. I had to do something similar before to replace OAuth 1 by OAuth 2.

infojunkie commented 5 years ago

Deployed to https://qa-dot-greenday-project.appspot.com/ - I was able to logout and login as usual. Would be good to test with a NEW user to make sure their info comes in correctly from the new People API.

infojunkie commented 5 years ago

Regarding the G+ URL, I am noticing it still exists: https://plus.google.com/u/1/103893092845072915208 - so where can we find it?

mhamzawey commented 5 years ago

I used my account and this is new to QA env. It worked fine.

image

infojunkie commented 5 years ago

Good to know, thanks for testing. The last thing to answer here before we can deploy this to live is:

Regarding the G+ URL, I am noticing it still exists: https://plus.google.com/u/1/103893092845072915208 - so where can we find it?

mhamzawey commented 5 years ago

@infojunkie yup it still exists but i couldn't find a way to get it from my account even if i included urls in the requested fields.

Old accounts might have it while new accounts don't

This was from my personal account testing their live API, urls has a value of G+ profile:

image

While using meedan's account, urls key is not there:

image

We can grab it if it exists and put it to null if it doesn't

here's the URL I use for testing their API

infojunkie commented 5 years ago

We can grab it if it exists and put it to null if it doesn't

Yes let's do that

mhamzawey commented 5 years ago

@infojunkie done. let me know if we can merge that to develop

mhamzawey commented 5 years ago

@infojunkie everything looks fine on my end.

Please check before merging to master

infojunkie commented 5 years ago

The changes here have broken a number of frontend tests (npm run test:frontend). Fixing before I merge to master.

infojunkie commented 5 years ago

Deployed live!