前言介紹
- 這款 WordPress 外掛「Log in with Google」是 2020-09-30 上架。
- 目前有 5000 個安裝啟用數。
- 上一次更新是 2025-03-06,距離現在已有 59 天。
- 外掛最低要求 WordPress 5.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 14 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
rtcamp | sh4lin | nikhiljoshua |
外掛標籤
sso | oauth | sign in | Google Login | authentication |
內容簡介
這是一個極簡化的外掛,讓您的使用者可以使用他們的 Google 帳戶登入 WordPress 應用程式,不再需要記住笨重的密碼!
初始設置
如果尚未存在,請從 Google 開發者控制台 建立一個項目。
前往憑證頁面,然後為 OAuth 用戶端建立憑證。
應用程式類型將為 Web 應用程式
在授權重新導向 URI 中添加 YOUR_DOMAIN/wp-login.php
這將為您提供客戶端 ID 和秘密金鑰。
將這些值輸入到 WP 管理員 > 設置 > WP Google 登入 或使用以下代碼片段在 wp-config.php 中輸入:
define( 'WP_GOOGLE_LOGIN_CLIENT_ID', 'YOUR_GOOGLE_CLIENT_ID' );
define( 'WP_GOOGLE_LOGIN_SECRET', 'YOUR_SECRET_KEY' );
瀏覽器支援
這些瀏覽器得到支援。請注意,例如,在 Safari 中不支援一次點擊登入。
如何啟用自動使用者註冊
您可以透過下列方式啟用使用者註冊:
- 啟用「設置 > WP Google 登入 > 啟用 Google 登入註冊」
或者
在 wp-config.php 檔案中添加
define( 'WP_GOOGLE_LOGIN_USER_REGISTRATION', 'true' );
注意:如果核取方塊為 ON,則有效的 Google 使用者會在 WordPress 的預設設置下註冊,詳情請見
「設置 > 一般 > 成員資格 > 任何人都可以註冊」核取方塊。
將使用者註冊限制為一個或多個域
默認情況下,當您透過常數 WP_GOOGLE_LOGIN_USER_REGISTRATION 或啟用「設置 > WP Google 登入 > 啟用 Google 登入註冊」以註冊使用者時,它將為任何 Google 登入(包括 gmail.com 使用者)創建使用者。如果您計劃在私人內部網站上使用此外掛,則可能希望將使用者註冊限制為單個 Google Suite 組織中的使用者。此配置變數可以實現此目的。
在「WP Google 登入 > 白名單域名」中添加您的域名,不帶任何模式前綴和 www,。您可以使用逗號分隔多個域名。請參見下面的示例,了解如何透過常數執行此操作:
define( 'WP_GOOGLE_LOGIN_WHITELIST_DOMAINS', 'example.com,sample.com' );
注意:如果使用者已存在,無論他們的域名是否在白名單中,他們都將可以使用 Google 登入。白名單僅會防止使用非白名單域名的電子郵件地址註冊使用者。
掛鈎
有關所有掛鈎的列表,請參閱此文檔。
wp-config.php 參數列表
WP_GOOGLE_LOGIN_CLIENT_ID(字符串):您應用程式的 Google 客戶端 ID。
WP_GOOGLE_LOGIN_SECRET(字符串):您的應用程式的秘密金鑰。
WP_GOOGLE_LOGIN_USER_REGISTRATION(布林值)(可選):如果要啟用新的使用者註冊,請設置為 true。如果未設置常數,則使用者註冊會遵循 設置 > 一般設置 > 成員資格 的設置。
原文外掛簡介
Ultra minimal plugin to let your users login to WordPress applications using their Google accounts. No more remembering hefty passwords!
Initial Setup
Create a project from Google Developers Console if none exists.
Go to Credentials tab, then create credential for OAuth client.
Application type will be Web Application
Add YOUR_DOMAIN/wp-login.php in Authorized redirect URIs
This will give you Client ID and Secret key.
Input these values either in WP Admin > Settings > WP Google Login, or in wp-config.php using the following code snippet:
define( 'WP_GOOGLE_LOGIN_CLIENT_ID', 'YOUR_GOOGLE_CLIENT_ID' );
define( 'WP_GOOGLE_LOGIN_SECRET', 'YOUR_SECRET_KEY' );
Browser support
These browsers are supported. Note, for example, that One Tap Login is not supported in Safari.
How to enable automatic user registration
You can enable user registration either by
– Enabling Settings > WP Google Login > Enable Google Login Registration
OR
Adding
define( 'WP_GOOGLE_LOGIN_USER_REGISTRATION', 'true' );
in wp-config.php file.
Note: If the checkbox is ON then, it will register valid Google users even when WordPress default setting, under
Settings > General Settings > Membership > Anyone can register checkbox
is OFF.
Restrict user registration to one or more domain(s)
By default, when you enable user registration via constant WP_GOOGLE_LOGIN_USER_REGISTRATION or enable Settings > WP Google Login > Enable Google Login Registration, it will create a user for any Google login (including gmail.com users). If you are planning to use this plugin on a private, internal site, then you may like to restrict user registration to users under a single Google Suite organization. This configuration variable does that.
Add your domain name, without any schema prefix and www, as the value of WP_GOOGLE_LOGIN_WHITELIST_DOMAINS constant or in the settings Settings > WP Google Login > Whitelisted Domains. You can whitelist multiple domains. Please separate domains with commas. See the below example to know how to do it via constants:
define( 'WP_GOOGLE_LOGIN_WHITELIST_DOMAINS', 'example.com,sample.com' );
Note: If a user already exists, they will be allowed to login with Google regardless of whether their domain is whitelisted or not. Whitelisting will only prevent users from registering with email addresses from non-whitelisted domains.
Hooks
For a list of all hooks please refer to this documentation.
wp-config.php parameters list
WP_GOOGLE_LOGIN_CLIENT_ID (string): Google client ID of your application.
WP_GOOGLE_LOGIN_SECRET (string): Secret key of your application
WP_GOOGLE_LOGIN_USER_REGISTRATION (boolean) (optional): Set true If you want to enable new user registration. By default, user registration defers to Settings > General Settings > Membership if constant is not set.
WP_GOOGLE_LOGIN_WHITELIST_DOMAINS (string) (optional): Domain names, if you want to restrict login with your custom domain. By default, it will allow all domains. You can whitelist multiple domains.
BTW, We’re Hiring!
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Log in with Google」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.1 | 1.2 | 1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | 1.2.1 | 1.2.2 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.3.5 | 1.3.6 | 1.3.7 | trunk | 1.0.10 | 1.0.11 | 1.0.12 | 1.0.13 | 1.0.14 |
延伸相關外掛(你可能也想知道)
UsersWP – Social Login 》這是 UsersWP 的社群登入外掛。UsersWP使用者可以透過本外掛使用 Facebook、Google、Twitter、LinkedIn、Instagram、Yahoo、WordPress、vkontakte 等社群網站...。
Social Login by BestWebSoft 》社交登入外掛可讓訪客使用流行的社交網路帳號於 WordPress 登入、註冊及留言表單上進行驗證。允許訪客使用 Google、Facebook、Twitter、LinkedIn 和 Instagra...。
Login with Google Apps 》現在,您可以使用Google Apps Login來保護您的網站登錄,該功能可讓使用者或員工使用Google憑證(Gsuite)進行單一登錄(SSO)到WordPress。相比WordPress登...。
Happy Social Login 》總結:, 使用Happy Social Login 外掛讓使用者可以透過其喜愛的社交媒體帳戶,如Facebook、Google、LinkedIn、Github等,在WordPress網站上進行註冊和登錄。,...。
GP Google login 》這是一個在 WordPress 中使用 Google 帳號進行簡單登錄的外掛程式。, 安裝外掛需要擁有 Google Apps 域的管理員權限或一個常規的 Gmail 帳號,以註冊並從 Goo...。
OAuth Social Login – Single Sign On – SSO 》WordPress OAuth Social Login 外掛可讓使用者使用 Discord、Facebook、Google、LinkedIn、Amazon、Yahoo 和 vkontakte 等應用程式進行 WordPress 單一登入,...。
EZ-Login 》
外掛總結:
,- ,
- EZ-Login是Wiraweb團隊開發的第一個也是唯一免費的波斯語外掛程式,可讓使用者透過簡訊和Google帳...。
GOAuth 》這個外掛讓使用者可以透過 OAuth 服務提供商進行認證。如果您的帳戶啟用了雙重驗證,那麼它將會運作,或者您可以使用 Google Authenticator App。, 相關依賴...。