frontend
frontend copied to clipboard
Replace deprecated gapi.auth2 with GIS
Description
Replaces calls to the deprecated gapi.auth2 with calls to Google Identity Services. With gapi.auth2, only api keys generated before 2022 July are functional (https://developers.google.com/identity/sign-in/web/sign-in). This change will also allow for local testing of Google persistence with user generated api keys.
All other calls made to gapi.client were untouched - GIS is used only to facilitate getting the access token from Google. google-oauth-gsi library is used for this. Existing Google picker UI remains the same.
Google login persistence is implemented by storing the access token in local storage.
Finally, login button is added to the Google Drive control bar for parity with Github control bar UI.
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Code quality improvements
How to test
Instructions from the wiki, "Obtaining the API keys from the Google API Console" is sufficient for setting up locally for testing.
Checklist
- [x] I have tested this code