When a user creates an account via Google OAuth, I want to trigger a Javascript event when the account is successfully created. Something like Google’s data-onsuccess:
<div class="g-signin2" data-onsuccess="onSignIn"></div>
What’s the easiest way to do this?