Skip to content
  1. Docs
  2. Checkout
  3. Social login

Social login

How to connect login and registration via Google, Facebook and Telegram in the Trust template for OpenCart 3: app keys, Redirect URI, Telegram bot, linking to existing accounts.

2 min read

Customers log in or register in one click — via Google, Facebook or Telegram. The buttons appear in the login window and on the login page.

Social login buttons on the storefront

Open Octemplates → Modules → Social Login.

General settings

Social login settings

  • Status — enables the module.
  • Link to an existing account — if a customer with the same email already exists, the social account is attached to their account instead of creating a duplicate. Works only when Google or Facebook confirmed the email. When off, such a customer has to log in with a password.

Security. Secret keys are stored only on the server and never reach store pages. After saving, a secret isn’t shown again — leave the field empty to keep it unchanged.

Google

The most reliable option: Google confirms the customer’s email.

  1. Create an OAuth client

    In Google Cloud Console open APIs & Services → Credentials → Create credentials → OAuth client ID and choose Web application.

  2. Add the Redirect URI

    Copy the Redirect URI from the module settings into Authorized redirect URIs.

  3. Paste the keys into the module

    Copy the Client ID (looks like 123456-abc.apps.googleusercontent.com) and Client Secret into the module, enable Google and save.

Facebook

  1. Create an app

    In Meta for Developers create an app and add the Facebook Login product.

  2. Add the Redirect URI

    Copy the Redirect URI from the module into Facebook Login → Settings → Valid OAuth Redirect URIs.

  3. Paste the keys into the module

    App ID (a number) and App Secret — from the app settings. Enable Facebook and save.

  4. Publish the app

    Switch the app to Live mode — otherwise only its testers can sign in.

Telegram

Telegram doesn’t share the email — the module asks the customer for it on first login.

  1. Create a bot

    In @BotFather run /newbot and copy the bot token (looks like 123456789:AA…) into the module. The bot is only used to verify the signature — it never writes to customers.

  2. In @BotFather run /setdomain, pick the bot and enter the domain from the “Domain for BotFather” field in the module. Without it Telegram won’t allow sign-in.

  3. Enable Telegram

    Turn the switch on and save.

Connected accounts

The “Connected accounts” tab shows which customers connected a social network, when, and their last login. The list can be filtered by network and email.

Connected accounts

The “Unlink” button disconnects the social network from the customer. The account itself isn’t deleted — the customer can log in with a password.