PickBazar Documentation
WelcomeHow It WorksGetting StartedFeaturesAvailable ScriptsCustomizationStyles and AssetsUtilities
Back-End Integration
Deployment
Update
SEO and Analytics
API
WalletSocial LoginGoogleFacebookOTP (Mobile Number Verification)TranslationMultilingualMultiVendorNew PageExport ImportFAQSupportVersions

Social Login

You can use a social network like Google or Facebook as a login provider like email/username and password. To set up social login, follow the below procedure,

Google

For Google, follow this procedure,

  1. At first go to Google Console dashboard (https://console.cloud.google.com/)
  2. From the console, create a new project Create_project.png
  3. After creating the project, go to APIs & Services -> OAuth consent screen.oAuthScreen.png
  4. Create an External OAuth Consent. Add all the required fields.
  5. Then, go to the credentials section and create OAuth Client ID.GAuth.png Add an Authorized redirect URIs. The format of the URIs should be:
http://yourdomain.com/api/auth/callback/google

Authorized_url.png 6. Then you'll get your credentials, GAuthCredentials.png

  1. Then open api/.env and add API ID and credentials, GAPISetup.png

  2. Then go to this https://generate-secret.now.sh/32 site and generate a secret key.

  3. Then open shop/.env and add credentials to GOOGLE_CLIENT_ID and GOOGLE_CLIENT_ID and NEXTAUTH_URL also add a SECRET code.

NEXTAUTH_URL=YOUR_SHOP_DOMAIN
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_ID=
SECRET=

After configuration, make sure you rebuild your project using this command,

For REST API

yarn build:shop-rest
yarn build:admin-rest

And for GraphQL,

yarn build:shop-gql
yarn build:admin-gql

Facebook

  1. Go to Facebook developer dashboard (https://developers.facebook.com/apps/)

  2. Then create a new app for pickbazar

  3. After that, set up Facebook Login. FacebookApp.png FBForWeb.png

  4. Then provide all the necessary information.

  5. After that, go to the settings page, and on that page, you'll get all the credentials.

  6. Then open api/.env and add API ID and credentials, FBClientSecret.png FBAPICredentials.png

  7. Then go to this https://generate-secret.now.sh/32 site and generate a secret key.

  8. Then open shop/.env and add credentials to FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET, NEXTAUTH_URL also add a SECRET code.

NEXTAUTH_URL=YOUR_SHOP_DOMAIN
FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
SECRET=

For Facebook, make sure you apply verification for the APP. Otherwise, the Facebook login won't work. (https://developers.facebook.com/docs/app-review/)

After configuration, make sure you rebuild your project using this command,

For REST API

yarn build:shop-rest
yarn build:admin-rest

And for GraphQL,

yarn build:shop-gql
yarn build:admin-gql