One-Tap is included in the current page with a Google API Client sample.
This Stack Overflow post describes some of the timing issues.
We're working toward allowing users to edit existing rows in a Google Sheet using REST/CRUD with a single-page-app. Also see our progress with server-side Google Auth using Python with Flask.
You'll need to be logged into the Google gmail account in another browser window
for the One-Tap popup to appear on this page.
If you click X in the popup, you'll need to clear your cookies and log into your gmail account again for the popup to appear.
1. TO DO: Uncomment the second makeApiCall() function so the user name and image appears when the user has clicked the "Authorize" button without
using One-Tap. Modify the script to prevent the error.
See Stack Overflow post describing the timing issue.
2. TO DO: Currently the user name and image only appear
if the user has authorized via Quickstart (displayed to the left).
Hit reload after authorizing to see user name and image appear on the left.
Try to display the user name and image following auto-login only by One-Tap, without authoizing on the left.
Use the notification.clientId returned by One-Tap.
3. TO DO: Hide the "Sign Out" button below if the user is not signed in via One-Tap.
The sign out button works if you have already been auto-logged in.
4. TO DO: The "Sign In" button below is not yet activated.
Have this display the One-Tap popup after the user has clicked the X in the One-Tap popup.
The message "suppressed_by_user" is triggered in an alert within this page after clicking the X and hitting reload.
You can clear recent cookies to restore the One-Tap popup. Log back in to GMail after clearing recent cookies.