Nop 4.1 Facebook plugin Valid OAuth redirect URIs

1 year ago
The plugin instruct to add for the  Valid OAuth redirect URIs: http://domain.com/signin-facebook
however for some reason it does not work.

https://domain.com/signin-facebook?code=.... says page not found. All the settings on fb are correct, and it aunthenticates user and returns to this url above, but for some reason the path is invalid in our app.

please check the screenshot here -  https://www.dropbox.com/s/fnwket4f2nypfwk/Nop40_FB_Login_Issue_RedirectUrl.png?dl=0

Can you please suggest me where is the problem?
1 year ago
Can anyone please help to go through with this problem....am really stuck, please help
1 year ago
rayyan wrote:
The plugin instruct to add for the  Valid OAuth redirect URIs: http://domain.com/signin-facebook
however for some reason it does not work.

https://domain.com/signin-facebook?code=.... says page not found. All the settings on fb are correct, and it aunthenticates user and returns to this url above, but for some reason the path is invalid in our app.

please check the screenshot here -  https://www.dropbox.com/s/fnwket4f2nypfwk/Nop40_FB_Login_Issue_RedirectUrl.png?dl=0

Can you please suggest me where is the problem?


Kindly change the redirect URL to http://domain.com/FacebookAuthentication/LoginCallback in section Client OAuth Settings of the Facebook.

Thanks!
1 year ago
Thank you for your reply.

I changed url to http://domain.com/FacebookAuthentication/LoginCallback but it doesn't work and gives error: URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs. when I click button "Sign in with Facebook"  

Can you suggest alternative solutions please.

Thank you
1 year ago
rayyan wrote:
Thank you for your reply.

I changed url to http://domain.com/FacebookAuthentication/LoginCallback but it doesn't work and gives error: URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs. when I click button "Sign in with Facebook"  

Can you suggest alternative solutions please.

Thank you


public IActionResult Login(string returnUrl)
        {
            if (!_externalAuthenticationService.ExternalAuthenticationMethodIsAvailable(FacebookAuthenticationDefaults.ProviderSystemName))
                throw new NopException("Facebook authentication module cannot be loaded");

            if (string.IsNullOrEmpty(_facebookExternalAuthSettings.ClientKeyIdentifier) || string.IsNullOrEmpty(_facebookExternalAuthSettings.ClientSecret))
                throw new NopException("Facebook authentication module not configured");

            //configure login callback action
            var authenticationProperties = new AuthenticationProperties
            {
                RedirectUri = Url.Action("LoginCallback", "FacebookAuthentication", new { returnUrl = returnUrl })
            };

            return Challenge(authenticationProperties, FacebookDefaults.AuthenticationScheme);
        }


Could you debug the code? if so then check what RedirectUri is being set while clicking on Sign in with Facebook.
1 year ago
I am using nopCommerce version 4.1 and the default Facebook Login Plugin: Facebook authentication
My website cannot login by facebook account.
After I changed the Valid OAuth Redirect URIs to https://domain.com/FacebookAuthentication/LoginCallback and tried to login, there is an error message in the Facebook login page (Just above the empty UserName). It is

"URL blocked
This redirect failed because the redirect URI is not white-listed in the app's client OAuth settings. Make sure that the client and web OAuth logins are on and add all your app domains as valid OAuth redirect URIs."

If I use the url: https://domain.com/signin-facebook, it has no such error message but still fail to login by Facebook. It will redirect to a page:
We're sorry, an internal error occurred.
Our supporting staff has been notified of this error and will address the issue shortly.
.....

However, at that time, if I go to the Facebook official page, my facebook account had been login.
1 year ago
has anyone found any solutions for this?
4 months ago
Hi guys

I am also experiencing the same problem. Do we have any idea what might be wrong?

Kind regards
Farshid
1 month ago
Hi everyone,

Has anyone found a solution, this is getting frustrating.
I tried a lot of solutions, but always same message
"URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs."

if someone have any solution i wolud be grateful
Thank you
1 month ago
Is you site running SSL ? Because you can not use the plugin unless you have a valid certificate installed and I have setting securitysettings.forcesslforallpages = true
If your website is called
    https://whatever.com
then the Valid OAuth Redirect URIs is
    https://whatever.com/signin-facebook
and I also entered
    https://www.whatever.com/signin-facebook

All the other settings I have are:
Client OAuth Login: Yes
Web OAuth Login: Yes
Enforce HTTPS: Yes
Force Web OAuth Reauthentication: No
Embedded Browser OAuth Login: No
Use Strict Mode for Redirect URIs: Yes