Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcode redirect_to parameter not working #154

Open
kvveltho opened this issue Apr 6, 2023 · 0 comments
Open

Shortcode redirect_to parameter not working #154

kvveltho opened this issue Apr 6, 2023 · 0 comments

Comments

@kvveltho
Copy link

kvveltho commented Apr 6, 2023

echo do_shortcode(' [google_login button_text="Aanmelden met Google" force_display="yes" redirect_to = "https://beta.fastfiber.be/mijn-account" ]');

Nomatter which url we set in redirect_to parameter of the shortcode the redirect_uri is always set to wp_login_url:

Error 400: redirect_uri_mismatch
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the redirect URI in the Google Cloud Console.
Request details: redirect_uri=https://beta.fastfiber.be/jhd86

In Container.php this part of the code is not taking in consideration the shortcode parameter:
return new GoogleClient(
[
'client_id' => $settings->client_id,
'client_secret' => $settings->client_secret,
// 'redirect_uri' => 'https://beta.fastfiber.be/mijn-account/subscription_custom/',
'redirect_uri' => wp_login_url(),
]
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant