I’ve added the Login with Google plugin and integrated the correct Google Cloud Console settings. I’ve set the allowed redirect URLs to match the login page, but the Login with Google option is not on the /my-account/ page. Please let me know how we can add this onto the account dashboard.
]]>It is possible ? very thanks….
Sure! Here’s how Reddit’s auto-login works: 1. Initial Login
When a user logs into Reddit by entering their credentials, Reddit’s servers verify the information. If the credentials are correct, Reddit generates a unique session token associated with the user. 2. Authentication Token
This session token acts as an identifier that Reddit uses to recognize the user. Reddit creates this token and sends it to the user’s browser as a cookie or a JSON Web Token (JWT). The token is stored on Reddit’s servers and also saved in the user’s browser. 3. Session Cookie
Reddit uses a cookie (often named reddit_session
or similar) to store the session token. This cookie is set to expire after a relatively long period (weeks or months, for example), allowing the user to stay logged in without having to re-enter their credentials frequently. 4. Automatic Login
Each time the user visits Reddit, their browser sends the session cookie back to Reddit’s servers. The server checks the token:
5. Token Refresh
In some cases, Reddit may refresh the session token (e.g., by generating a new one) to extend the session without the user needing to re-login. This refresh process happens in the background and is seamless to the user. Security Measures
HttpOnly
(which blocks JavaScript access) and Secure
(which ensures cookies are only sent over HTTPS).Ending Auto-Login
If a user logs out manually or deletes their cookies, Reddit will invalidate the session token, and auto-login will stop until they re-enter their credentials.
This system makes logging in seamless while also ensuring good security for the account.
]]>Awesome plugin. Best Google connect I’ve used as I am having a nightmare with others. However, I need to also grab the Google profile image to use as the profile image for WP. Anyway to do that with this plugin?
]]>Can we also have user Display Picture with google login ?
]]>Suddenly I am not able to login with google. Error I am getting is “Could not retrieve the access token, please try again.” And below errors are coming in console
403 error for GEThttps://accounts.google.com/gsi/status?client_id=XXXX&as=WXLPnwhQ9l7SVBimta1lKg
[GSI_LOGGER]: The given origin is not allowed for the given client ID.
i installed plugin and completed all api integration but in my account page login with google is not visible and also if unregistered user goes to my account page it is showing last logged in user name
]]>Hi Plugin Developer,
Can I request to provide some guidelines to setup this plugin in multisite?
How do I set this plugin for each individual site in a multisite network?
I have followed the steps, but I still cannot see the Google login option on the main domain login page after adding the keys to the dashboard.
Is its working with multisite please confirm.
Many Thanks!
]]>All of the steps were basic and easy.
I checked everything, and even waited a full day.
Unfortunately, when trying to login it says “Registration not allowed”.
Thank you.
Great App!! I have seen a few alternatives come and go over the years but this one is my go to one. I have two suggestions though (not urgent) that might make it a bit more complete without making it more complex:
Anyway, even if these suggestions never see the light of day I still think its the best plugin for this out there!
Best, Ronald
]]>I apologize as I’m not an expert, can anyone help me? where can I put this $auth_url = plugin()->container()->get( ‘gh_client’ )->authorization_url(); I use peepso and would like to add the button! I think the plugin is working well ?? thanks!!
]]>We noticed a bug where when we try to login with our gmail with the One tap login (the popup window that appears at the top right corner for the first time visit), after logging in with google, it redirects you back to the wp login page with error:
‘The username field is empty’
‘The password field is empty’
then when you try to login again with google, then it will work.
Can you look into this issue?
Thanks!
]]>I’ve been able to get the login-with-google plugin working on my mutli-site WordPress installation by entering the client_id and secret in the Settings UI for each of the wordpress sites in my multi-site deployment. This was needed because I was unable to get the wp-config.php
configuration settings to work.
I added this to my wp-config.php
/* https://www.ads-software.com/plugins/login-with-google/#description */
define('WP_GOOGLE_LOGIN_CLIENT_ID', '7935-REDACTED-nbfu.apps.googleusercontent.com');
define('WP_GOOGLE_LOGIN_SECRET', 'Tk-REDACTED-nh');
define('WP_GOOGLE_LOGIN_USER_REGISTRATION', 'false');
And I can confirm that the plugin is able to see these values because when I login using username/password and go to the login-with-google Settings UI, these 3 fields are greyed out and can’t be set, and the values that I’ve put in my wp-config.php
are present in the fields in the Settings UI.
The problem is that the plugin doesn’t seem to use these values if they’re configured in wp-config.php
, only if they’re configured in the Settings UI.
I’ve tested configuring the client_id
in wp-config.php
and found that the “Log in with Google” button on the login page, which is a link to start the OAuth flow, has an empty client_id
value. This obviously causes the OAuth login to fail.
I’ve also tested by setting the client_id
in the plugin Settings UI and the secret
in wp-config.php
. In this case, the “Log in with Google” button is correct and has the client_id
but the OAuth flow fails because the plugin isn’t aware of the secret
.
I’ve read through the code and am assuming that this relates to the utils/GoogleClient.php
and the __construct
method in the GoogleClient
class. This sets the $this->client_id
value using the $config
array that’s passed in.
The array that’s passed in when the object is instantiated is in src/Container.php
in the define_services
method of the Container
class. I’m not familiar with the details here but I have to assumed that it’s only reading from the values set in the UI settings and ignoring anything set in wp-config.php
This should be reproducible on your side, just set the client_id
and secret
in wp-config.php
and see if you can login.
If indeed you’re not able to reproduce this, let me know and I can share more details about my setup.
]]>Hello! I got a Googe OAuth app, I entered client ID and secret, I added Authorized redirect URIs, what now?
]]>Hello. I installed the version Login with Google 1.3.1 for the very first time on WP 6.1.3 and I am getting the following error on any page of my site:
Fatal error: Uncaught Error: Call to a member function get_page_permastruct() on null
in /home/smdev/public_html/wp-includes/link-template.php on line 431
Any ideas why?
The call stack is below
Fatal error: Uncaught Error: Call to a member function get_page_permastruct() on null
in /home/smdev/public_html/wp-includes/link-template.php on line 431
Call stack:
_get_page_link()
wp-includes/link-template.php:393
get_page_link()
wp-includes/link-template.php:197
get_permalink()
wp-content/plugins/restrict-content-pro/includes/redirects.php:65
rcp_hijack_login_url()
wp-includes/class-wp-hook.php:310
WP_Hook::apply_filters()
wp-includes/plugin.php:205
apply_filters()
wp-includes/general-template.php:459
wp_login_url()
wp-content/plugins/login-with-google/src/Container.php:118
RtCamp\G\Container::RtCamp\G{closure}()
wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Container.php:118
Pimple\Container::offsetGet()
wp-content/plugins/login-with-google/src/Container.php:101
RtCamp\G\Container::RtCamp\G{closure}()
wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Container.php:118
Pimple\Container::offsetGet()
wp-content/plugins/login-with-google/src/Container.php:68
RtCamp\G\Container::get()
wp-content/plugins/login-with-google/src/Plugin.php:140
RtCamp\G\Plugin::activate_modules()
wp-content/plugins/login-with-google/src/Plugin.php:110
RtCamp\G\Plugin::run()
wp-content/plugins/login-with-google/login-with-google.php:130
RtCamp\G{closure}()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-settings.php:480
require_once()
wp-config.php:126
require_once()
wp-load.php:50
require_once()
wp-blog-header.php:13
require()
index.php:17
]]>
I’d like to enable automatic user registration by using the Create New User checkbox on, and need to set new users to be administrator, without changing the default setting of WordPress. How is that possible?
]]>Hello, ive been using the plugin, and i was wondering, if there is a way to redirest the user to a custom url, only if he registered (not if he previously had an account)
Thank you in advance
]]>ive seen the shortcode addition
1.1
[google_login]
with optional attributes: [google_login button_text="Login with Google" force_display="no" redirect_to="https://example.url/page"]
but i was wondering, what link should we use (if possible, otherwise a php function) to redirect the user in the source page. For example, if he tries to login/signup while in checkout, redirect him to checkout after signup/login.
Thank you in advance
]]>Hello, and thanks for creating this plugin! I recently received this notice from Google and wanted to know if it’s going to impact my users’ ability to log in. Thanks!
Hello Google Developer,
We’re writing to let you know that we detected the use of an embedded webview in requests to Google’s OAuth 2.0 authorization endpoint in the past 120 days associated with one or more of your OAuth client IDs listed in this email.
Any affected authorization endpoint requests will be blocked with a disallowed_useragent
error starting July 24, 2023. Affected requests to our authorization endpoint will display a user-facing warning message starting in May until July 24, 2023.
What do you need to know?
Embedded webview libraries are highly customizable, which can expose Google’s login and account authorization pages to potential “man-in-the-middle” attacks. Google’s OAuth 2.0 “Use secure browsers” policy helps us protect users from these and other types of attacks.
Examples of affected embedded webview libraries include android.webkit.WebView
on Android and WKWebView
on iOS or macOS.
What do you need to do?
Note: Suppression of the user-facing warning message is not supported.
]]>How can I get the access and refresh tokens to save as user Meta? I’ve been using chatgpt to help me try and figure it out but I can’t find where your plugin is storing the access and refresh tokens for custom scopes.
I did already manage to create a custom plugin that hooks in with your plugin to ask for the scope permissions when the user logs in, but I need to be able to use the tokens in another script.
]]>The plugin generates the following PHP warnings:
PHP Deprecated: Return type of Pimple\Container::offsetExists($id) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Container.php on line 133
PHP Deprecated: Return type of Pimple\Container::offsetGet($id) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Container.php on line 98
PHP Deprecated: Return type of Pimple\Container::offsetSet($id, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Container.php on line 79
PHP Deprecated: Return type of Pimple\Container::offsetUnset($id) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /wp-content/plugins/login-with-google/vendor/pimple/pimple/src/Pimple/Container.php on line 143
]]>
Hi, does this plugin support the latest version of Google Sign-In which has been changed to “Google Identity Services”?
]]>I have another plugin that is able to do this, but i find this plugin well better maintained.
I would like to add google user image to the wordpress avatar automatically, I have another plugin to use this with, but its an extension of their current plugin.
How can we make this together?
]]>Hi there!
Good plugin, i like its simple, I migrated away from other plugins for that reason. I miss one key feature though the ability to automatically redirect to Google from the login page. It can be very confusing for people to see both login fields (user / password) and a login with google box. In our case everybody logs in with google so it would be great if there was a setting so you could jump directly to the google account chooser page. No fields, no buttons.
Other small suggestion is to grey out the domain white list field in settings when registration is disabled. Maybe put the domain white list field right underneath the new registration check box.
Thanks, keep up the great work!
Ronald
]]>We see the following error when trying to login via google with chrome:
Could not retrieve the access token, please try again.
Getting this error when i click on login with google button. Where do i set the redirect uri in the plugin config?
redirect_uri_mismatch
We are using a shortcode on another page. We don’t need it to appear on the /wp-admin page. I’ve tried using CSS with display none on the element but that did not work.
]]>Hello – I’m trying to use this plugin but both options in the instructions aren’t available to me:
“Input these values either in WP Admin > Settings > WP Google Login, or in wp-config.php using the following code snippet…”
WP Google Login is activated but not showing up in Settings, and I’m also using a child theme that doesn’t contain wp-config.php.
Any ideas on what to do?
]]>Is it possible with this plugin to allow all members of a specified Google Group to log into the WordPress site? If not, this would be a very useful feature in a volunteer project I manage. We’re using Google Groups as the source of truth to onboard people to the project management systems, but we have to set them up with user accounts in a WordPress site separately. Would be great to eliminate this WordPress account creation step.
]]>Hello! Installed the plugin, and configured it. Everything is exactly as you have in the description. But registration does not happen. Writes “Cannot register with this email:” and the user’s email. Please help me solve the problem.
]]>Can we check an email address before an account is created, for example if email address is this, this and this, create an account, otherwise show an error message. Thanks
]]>