While migrating to the new Google Identity Services client library, I noticed that there is no way to get notified when the authentication flow actually starts, i.e. when the user has clicked the Sign in with Google button. Such a callback, however, is needed to instruct other (React) components to reset their state, especially when performing multiple login attempts upon failure and mixing this with a password-based sign in or other social providers.
Previously, this was possible by overloading the button's onClick handler. This approach does not work anymore since the button will be injected as an iframe.
How can I now recognize when a user has clicked Sign in with Google?
See JavaScript API reference: https://developers.google.com/identity/gsi/web/reference/js-reference