Google Login by Ikbal
Secure WordPress plugin that enables Google Login & Registration using OAuth 2.0. Includes shortcode support, auto user registration/login, admin settings panel, customizable redirects, dark mode support, and automatic GitHub-based plugin updates.
by Ikbal Singh · github.com/appcoderikbal/login-with-google-wp-plugin · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/appcoderikbal/login-with-google-wp-plugin/archive/refs/heads/main.zipDeclares an update source (https://github.com/appcoderikbal/Login-with-google-wp-plugin), so updates arrive through the plugin's own updater.
Readme
Login with Google - WordPress Plugin
Allow users to login or register on your WordPress site using their Google account.
Features
- ✅ One-Click Login/Register – Google OAuth 2.0 authentication
- ✅ Smart User Handling – Auto-login for existing users, auto-register for new ones
- ✅ Shortcode –
[login_with_google]- place the button anywhere - ✅ Admin Settings – Easy configuration panel under Settings menu
- ✅ Customizable – Button text, redirect URL, user role
- ✅ Secure – CSRF protection with state verification
- ✅ Auto-Updates – Updates via WordPress dashboard from GitHub releases
- ✅ Dark Mode – Automatic dark theme support
Installation
- Download or clone this repository
- Upload to
/wp-content/plugins/login-with-google/ - Activate the plugin in WordPress
- Go to Settings → Login with Google
- Enter your Google OAuth credentials
Google Cloud Setup
- Go to Google Cloud Console
- Create a new project (or select existing)
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth 2.0 Client ID
- Select Web Application
- Add Authorized redirect URI:
https://yoursite.com/wp-json/lwg/v1/callback - Copy Client ID and Client Secret into plugin settings
Shortcode
[login_with_google]
[login_with_google text="Continue with Google"]
[login_with_google class="my-class"]
Versioning
This plugin supports automatic updates from GitHub. To release a new version:
- Update the version number in
login-with-google.php(both the header andLWG_VERSIONconstant) - Update
readme.txtstable tag - Commit and push changes
- Create a new GitHub release/tag (e.g.,
v1.0.1) - WordPress sites using this plugin will detect the update automatically
File Structure
login-with-google/
├── login-with-google.php # Main plugin file
├── readme.txt # WordPress readme
├── README.md # GitHub readme
├── includes/
│ ├── class-lwg-admin.php # Admin settings page
│ ├── class-lwg-google-auth.php # Google OAuth handler
│ ├── class-lwg-shortcode.php # Shortcode renderer
│ └── class-lwg-updater.php # GitHub auto-updater
└── assets/
└── css/
├── lwg-style.css # Frontend styles
└── lwg-admin.css # Admin styles
License
GPL v2 or later