Plugin Support
Gabor
(@nextendweb_gabor)
Hi @freedealsandoffer!
I would like to first start with our “OAuth redirect uri proxy page” setting:
https://nextendweb.com/nextend-social-login-docs/global-settings/
This setting was made, that if you don’t want to use the wp-login.php page of your website to handle our login, you can select a different page. This page should be a new page, not an existing one, because once you select it for our setting, you won’t be able to reach its url anymore.
From the error message you have, I don’t think currently this setting is used at your website, because the error still tries to use wp-login.php to login. So I suggest creating a new page and selecting it (and don’t use the https://example.com/login page for this, as probably you have a used login page there, what you want to reach).
Then the error message you have will be connected to the step 17. setting:
https://nextendweb.com/nextend-social-login-docs/provider-google/#configuration
It tells you, that at your Google API:
https://console.developers.google.com/apis/credentials/oauthclient/
the “Authorised redirect URIs” is wrong. I suggested first setting the “OAuth redirect uri proxy page”, because if you set that, on your admin area you will see a new url appearing within our step-by-step instructions, and that will be the url you will need to use.
So in an error message like this:
“Error 400: redirect_uri_mismatch
The redirect URI in the request, https://example.com/wp-login.php?loginSocial=google, does not match the ones authorized for the OAuth client.”
the API tells you, that it needs https://example.com/wp-login.php?loginSocial=google to be the “Authorised redirect URIs”. But if you will change the “OAuth redirect uri proxy page”, then you will need another url, what you will find in the admin area.
Thanks, it did the trick, but we’ve couple of queries.
1. After registration/login, user is getting an email with the login url and to change the password which is still the old login page like –
https://example.com/wp-login.php
How can we change this url to our new login page –
https://example.com/login/
Is it controlled by any setting or any custom function?
2. After login, user is getting redirected to page –
https://example.com/login/
We’ve modified this under “Global settings -> Default redirect url” and given a separate url to redirect after login, but it is not working.
Is this the correct setting to modify or is there any other setting available?
Hi @freedealsandoffer
1) Registration email
The first thing you should know about the automatic registration emails is that they’re not sent by Nextend Social Login but by WordPress itself. Our plugin simply tells WordPress to send out the email for the newly registered users.
That being said you can use any plugin to customize the content of this email that can work with default WordPress emails. We don’t have options to do that, but any plugin that can customize the WordPress notification emails should work. Probably this will work as well: https://ww.wp.xz.cn/plugins/bnfw/
2) Default redirect URL
The default redirect URLs are only used when the when redirect does not appear in the URL.
In most cases this redirect appears in the URL, and probably that is why the set Default redirect URL isn’t working.
For example, if the login is started on https://example.com/login-page
then the Login URL will be something like:
https://example.com/wp-login.php?loginSocial=facebook&redirect=https%3A%2F%2Fexample.com%2Flogin-page%2F
containing a &redirect= parameter which will be used to redirect the users back to the https://example.com/login-page.
If the redirect parameter appears in the URL, then only the Fixed redirect url can override that at Global settings > General:
https://nextendweb.com/nextend-social-login-docs/global-settings/
but this will affect every login and registration redirect.
Do you have any content on your https://example.com/login/ page?
If not, then maybe you could rather make this pare redirect to e.g. the home page for logged in users. Did you use some kind of plugin to create this login page? Maybe it has option to make the page not available for logged in users.
Thanks for the insights. It helped a lot.