-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace deprecated gapi.auth2 with GIS #2762
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 8936442491Details
💛 - Coveralls |
Hi @sumomomomomo, congratulations on creating your first PR in Source Academy and to start contributing your changes! Do note that even though you bypassed the code validation and checking when pushing to the repository sub-branch, you should still ensure that your code is well formatted and passes tests before opening the pull request. The points mentioned above can be done with the 2 commands as follows:
I will take a look at your changes in a bit, and let you know some feedback for the changes that you have made. Keep up the good work and thanks for the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for working on this; there seems to be a couple of weird changes that I'm not sure about. I don't think there's a need to add any dependency, at least at the moment.
Though I really feel you should try to see if Google provides an NPM library to make it easier to interact with the API; if possible, we should not need to worry about writing our own fetch calls, headers, etc. to the API endpoints.
Thanks again and let me know via Telegram if you encounter any issues!
edebfec
to
892b4a2
Compare
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
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