You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Ive tested this so far on 2 different websites, with new installs, and i am getting the same issue..
More or less here is what im doing, I have installed the plugin, I have the following options enabled:
I have the following setup in my Cloud:
Im using the following button shortcode:
<?php // Use home_url() to create the full path for the dashboard $dashboard_url = home_url('/account/'); echo do_shortcode('[google_login button_text="Login with Google" redirect_to="' . esc_url($dashboard_url) . '" /]'); ?>
When we hit google the url looks like this:
this is a temporarily work around which just replaces the part in the URL:
<?php
add_action('init', function () {
// Check if the current request is for wp-login.php
if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/wp-login.php') !== false) {
// Parse the current URL
$current_url = $_SERVER['REQUEST_URI'];
// The part to be removed
$remove_part = '+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile';
// Check if the part to be removed exists
if (strpos($current_url, $remove_part) !== false) {
// Remove the unwanted part
$new_url = str_replace($remove_part, '', $current_url);
// Redirect to the cleaned URL
wp_redirect(home_url($new_url));
exit;
}
}
});
Hi, Ive tested this so far on 2 different websites, with new installs, and i am getting the same issue..
More or less here is what im doing, I have installed the plugin, I have the following options enabled:
I have the following setup in my Cloud:
Im using the following button shortcode:
<?php // Use home_url() to create the full path for the dashboard $dashboard_url = home_url('/account/'); echo do_shortcode('[google_login button_text="Login with Google" redirect_to="' . esc_url($dashboard_url) . '" /]'); ?>
When we hit google the url looks like this:
https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?client_id={my client ID}&redirect_uri=https%3A%2F%2Fwebsite.com%2Fwp-login.php&state=eyJub25jZSI6IjFkM2VhNDM2M2MiLCJyZWRpcmVjdF90byI6Imh0dHBzOlwvXC9yZXN0YXJpZnkuY29tXC9kYXNoYm9hcmRcLyIsInByb3ZpZGVyIjoiZ29vZ2xlIn0%3D&scope=email%20profile%20openid&access_type=online&response_type=code&service=lso&o2v=1&ddm=1&flowName=GeneralOAuthFlow
This works fine when it goes back to the website the url looks like this:
https://website.com/wp-login.php?state=eyJub25jZSI6IjFkM2VhNDM2M2MiLCJyZWRpcmVjdF90byI6Imh0dHBzOlwvXC9yZXN0YXJpZnkuY29tXC9kYXNoYm9hcmRcLyIsInByb3ZpZGVyIjoiZ29vZ2xlIn0%3D&code=4%2F0AanRRruud25GHz0lg2KjyyS5Dh94E5_s2xPr_viLsT9PKhT2Bbm_oaOy-VTTXhzHEWsPcA&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=1&prompt=none
This will cause a 404 Page.
However, if I remove this part:
+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile
Then it will work correctly. login, and create the user.
I can't find where this code is being generated... i thought it might be an encoding issue but it wasn't... it just seems to be the 2 google urls.
I don't even have these selected in the google cloud:
Can someone look if there is an issue here?
The text was updated successfully, but these errors were encountered: