How surendhar153/one-tap-google-sign-in works
This WordPress plugin adds Google One Tap sign-in and sign-up, with optional buttons on WordPress and WooCommerce login forms and a shortcode. An administrator configures the Google client ID and options; on eligible pages the plugin renders Google sign-in UI, receives a credential at its sign-in endpoint, verifies it, then logs in an existing user or registers a new one and redirects. The graph follows the sampled PHP; it does not assume details of unsampled WordPress or Google internals.
Main entry points: class-gotl.php Sign-in runtime · admin/plugin-settings.php Settings handler · init.php Runtime loading · templates/plugin-settings.php Settings page
Components 19
Plugin and settings
- Plugin bootstrap
one-tap-google-sign-in.php - Runtime loading
includes/init.php - Settings handler
includes/admin/plugin-settings.php - Settings page
includes/admin/templates/plugin-settings.php - WordPress options
Sign-in experience
- Sign-in runtime
includes/class-gotl.php - Google sign-in client
- Shortcode button
includes/class-gotl.php - WordPress login button
includes/class-gotl.php - WooCommerce login button
includes/class-gotl.php
Identity and accounts
- Google Identity
- Credential endpoint
includes/class-gotl.php - Account lookup
includes/class-gotl.php - New account registration
includes/class-gotl.php - Existing account login
includes/class-gotl.php - WordPress users
- Return to page
includes/class-gotl.php
Other components
- Administrator
- Site visitor
Connections 23
- Administrator → Settings handler: configures
includes/admin/plugin-settings.php - Settings handler → Settings page: includes
includes/admin/plugin-settings.php - Settings handler → WordPress options: saves options
includes/admin/plugin-settings.php - Settings page → WordPress options: reads options
includes/admin/templates/plugin-settings.php - Plugin bootstrap → Runtime loading: loads
one-tap-google-sign-in.php - Runtime loading → Sign-in runtime: loads
includes/init.php - Runtime loading → Settings handler: loads
includes/init.php - Sign-in runtime → WordPress options: reads options
includes/class-gotl.php - Site visitor → Sign-in runtime: visits site
includes/class-gotl.php - Sign-in runtime → Google sign-in client: enqueues script
includes/class-gotl.php - Sign-in runtime → Shortcode button: registers shortcode
includes/class-gotl.php - Sign-in runtime → WordPress login button: registers login hook
includes/class-gotl.php - Sign-in runtime → WooCommerce login button: registers login hook
includes/class-gotl.php - Google sign-in client → Google Identity: loads client
- Google Identity → Credential endpoint: posts credential
includes/class-gotl.php - Credential endpoint → Google Identity: verifies token
includes/class-gotl.php - Credential endpoint → Account lookup: looks up email
includes/class-gotl.php - Credential endpoint → New account registration: registers if absent
includes/class-gotl.php - Credential endpoint → Existing account login: logs in if found
includes/class-gotl.php - New account registration → WordPress users: creates user
includes/class-gotl.php - Existing account login → WordPress users: updates user
includes/class-gotl.php - New account registration → Return to page: redirects
includes/class-gotl.php - Existing account login → Return to page: redirects
includes/class-gotl.php