Configuring Social Media Logins in the web store (SSO Implementation)

TABLE OF CONTENTS

Introduction

Guidelines to enable social media login option (Google and Facebook) in Znode webstore.

Steps for Google Login

  1. Create a developer’s account and start a new project.
    1. Go to developers.google.com and create a developer account.
    2. Go to console.developers.google.com and create a new project.
  2. Add hosted web store URL’s in the developer’s account.
    1. Open the project and click “Credentials” under “APIs and Services”
  3. Click on “Create Credentials” and then “OAuth client ID” from the drop-down
  4. From the screen that follows, select “Web Application” and click “Create”.
  5. Open the client and copy“Client ID” and “Client secret” in a notepad. It will be needed during step 3
  6. In the client under “Authorized redirect URIs”, add the following two entries and click on“Save”:
    1. URL of your webstore followed by “/signin-google”.
    2. URL of your webstore followed by “/User/ExternalLoginCallback/”
       
    3. Add entries in the ‘ZnodePortalLoginProvider’ table with proper keys

Steps for Facebook Login

  1. Create a developer’s account and create a new app
    1. Go to developers.facebook.com and create a developer account.
    2. Go to “My Apps” and create a new app
  2. Add hosted web store URLs in the developer’s account
    1. Open the project and click “Credentials” under “API’s and Services”
    2. In the app, go to Settings -> Basic
  3. Copy “App ID” and “App Secret” in a notepad. It will be needed during step 3. Add the. URL of the webstore under App Domains
  4. Click on “Add Platform -> Website”, add the URL of the webstore under “Site URL” and click “Save Changes”
  5. Go to Products ->Facebook Login ->Settings
  6. Under “Client OAuth Settings>Valid OAuth Redirect URLs”, add the following two entries and click on “Save Changes”
    1. URL of your webstore
    2. URL of your web store followed by “/signin-facebook/”.
  7. Change the “Live” toggle to active.

  8. Add entries in the ‘ZnodePortalLoginProvider’ table with proper keys

Znode Logins

Username - znodedev@gmail.com

Password - znode@1234

Important SQL queries for Znode:

select * from ZnodePortalLoginProvider

select * from ZnodeLoginProvider

select * from ZnodeDomain

insert into ZnodePortalLoginProvider (PortalId, LoginProviderId, ProviderKey, SecretKey, DomainId,

CreatedBy, CreatedDate, ModifiedBy, ModifiedDate) values (1, 2, KEY, PASSWORD, 17, 2, '2017-02-13

00:00:00.000', 2, '2017-02-13 00:00:00.000')

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.