Google+ login Plugin error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hello Friends..

I need your help as I am new to NopCommerce as well as MVC.

As per the Instructions I downloaded the Google+ Plugin and installed it. But when I click on "Login with Google" button it shows as error as below:

Error: redirect_uri_mismatch

The redirect URI in the request, http://localhost:15536/plugins/externalauthGoogle/logincallback/, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/254122531493-johvo8j437652r11sugocudalu7807kl.apps.googleusercontent.com?project=254122531493 to update the authorized redirect URIs.

Learn more

Request Details
response_type=code
client_id=254122531493-johvo8j437652r11sugocudalu7807kl.apps.googleusercontent.com
redirect_uri=http://localhost:15536/plugins/externalauthGoogle/logincallback/
scope=https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email


I searched to solve this error and tried almost all solutions but still getting this error.

Can anybody help me to get rid of this ??

Thank you in advance !!
7 years ago
you need to logon your google console
https://console.developers.google.com

and update the credentials
u can add several Authorized redirect URIs for your domain and local host
http://localhost:15536/signin-google
7 years ago
Thanks alot Hezy Ziv !!

I followed your instructions but still getting the same error...

Do I have to code anything for this ??
Coz it seems like its doesn't redirecting properly.

As NopCommerce has given inbuilt Facebook Plugin it works properly but the plugins I installed seems not working properly.

Facebook plugin has its own class library, so do I have to add class library for Google and Twitter logins ??

FYI I am working on NopCommerce 3.80.


Thank you
7 years ago
Configuring Google OAuth2

Google Developers Console
Go to the https://console.developers.google.com/ and log in with your Google Developer Account
Select "Create Project"
Go to APIs & Auth -> Credentials in the left-hand navigation panel
Select "Create new Client ID" in the OAuth Panel
In the creation panel:
Select "Web application" as Application Type
Set "Authorized JavaScript origins" to the URL of your nopCommerce site (http://www.yourStore.com)
Set "Authorized redirect URI" to URL of login callback (http://www.yourStore.com/plugins/externalauthGoogle/logincallback/)
Then go to APIs & Auth -> Consent Screen and fill out
Now get your API key (Client ID and Client Secret) and configure your nopCommerce
For more details, read the Google docs: Using OAuth 2.0 to Access Google APIs https://developers.google.com/identity/protocols/OAuth2.

In Google developer console make sure you have added localhost also as shown below.


Authorized JavaScript origins
http://localhost
http://yourstore.com

Authorized redirect URIs
http://yourstore.com/plugins/externalauthGoogle/logincallback/
http://localhost:15536/plugins/externalauthGoogle/logincallback/
7 years ago
Thank you so much eng.gagandeepsingh.

Your Solutions helped me to get rid of that error and now I am able to login with google.

Thanks Thanks Thanks Thanks Thank you soo much....
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.