Social Login for Magento 2

Let shoppers sign in and register with the accounts they already use — on your sign-in page and at checkout.

  • Google · Facebook · X
  • Magento 2.4.6 – 2.4.9
  • PHP 8.2 – 8.5
  • Hyvä and Luma
  • Version 2.0.3

Free

No payment needed, with 12 months of updates.

Add it to your cart and complete the free checkout. Your ZIP downloads and Composer access will be in your account.

What is included

  • Install with Composer, or download a zip from your account
  • Licence for one production domain, staging and development copies included

No subscription or automatic renewal. Keep using the versions included in your update period. Update and licence details

Key features

  • Google, Facebook and X (Twitter) sign-in
  • Buttons on sign-in, registration and checkout
  • Popup or full-page sign-in
See all features

Composer package commercegears/module-social-login

Social Login for Magento 2 Free

Sign in with the account they already have

Every extra form field costs you customers. Social Login lets shoppers sign in and create an account with Google, Facebook or X in one click: on the sign-in page, the registration page, the checkout and anywhere else you place the buttons.

It is built for production stores: no third-party SDKs, every ID token fully validated, PKCE where the provider supports it, and careful rules for linking an existing account so a social sign-in can never be used to take over someone else's account. It works on Luma and Hyvä, per website and store view, and stores nothing but the link between the customer and the provider.

  • Sign up in one click

    Shoppers use the account they already have. No form to fill in and no new password to remember.

  • Sign in at checkout

    The buttons sit in the checkout sign-in popup and above the email field, right where shoppers decide.

  • Safe by design

    Every ID token is validated and accounts are only linked when the email address can be trusted.

All features

What is included

Providers

  • Google (OpenID Connect with PKCE)
  • Facebook (Graph API with appsecret_proof)
  • X / Twitter (OAuth 2.0 with PKCE, optional email)
  • Your own button labels and order
  • More providers with Social Login Pro

Where the buttons appear

  • Sign-in page
  • Create-account page
  • Authentication popup and checkout sign-in
  • Checkout email step (guests)
  • CMS widget and layout block

Accounts

  • New accounts in the customer group you choose
  • Optional welcome email
  • Link existing customers automatically or after their password
  • Existing customers only mode for B2B and trade shops
  • Works with CommerceGears Customer Approval

Customer experience

  • Popup or full-page sign-in
  • Icon and text or icon only, light or dark
  • Stay on the page, go to My Account or a custom URL
  • Connected Accounts in My Account
  • Short form when a provider gives no email or name
  • "Open in your browser" note in Instagram, Facebook and other in-app browsers

Security and privacy

  • Single-use state bound to the browser
  • ID tokens validated: signature, issuer, audience, expiry, nonce
  • Email addresses trusted only when verified
  • Confirmation email for unverified addresses
  • No access tokens stored; links deleted with the customer

Admin and developers

  • Linked Accounts grid and customer tab
  • Separate ACL permissions
  • CLI: list, unlink and self-test
  • Per website and store view settings
  • Extension point for more providers

Feature tour

Everything your shoppers and your team see

01 / 07

One click instead of a form

Buttons above the sign-in and registration forms. Icon and text or icon only, light or dark, in the order you choose.

02 / 07

Sign in without leaving the checkout

The "Sign In" popup on the checkout page and the authentication popup show the same buttons, so returning customers check out faster.

03 / 07

Native Hyvä templates

Alpine.js and Tailwind templates for Hyvä 1.3+, picked automatically. Luma, Blank and their child themes work out of the box.

04 / 07

Made for small screens

Buttons stack into full-width rows on phones, where typing an email address and a password is hardest.

05 / 07

Customers manage their connections

My Account › Connected Accounts lists the linked providers. Customers connect another one or disconnect one, but never the last way to sign in.

06 / 07

One settings page, per store view

Choose where the buttons appear, how they look, what happens after sign-in and which customer group new accounts join.

07 / 07

The exact callback URL, ready to copy

Each provider shows the callback URL to register for the current store view, with short setup steps. Secrets are stored encrypted.

Live demo

Try it before you install it

A full Magento store with the module installed, on Luma and on Hyvä. The admin demo signs you in with one click.

Compatibility

Requirements and compatibility

Compatibility of Social Login for Magento 2
Magento2.4.6 – 2.4.9
PlatformsMagento Open Source and Adobe Commerce
Storefront themes Luma Blank Hyvä
PHP8.2 – 8.5
Latest version 2.0.3
composer.json requires php ~8.2.0||~8.3.0||~8.4.0||~8.5.0 ext-json * ext-openssl * magento/framework ~103.0.6 commercegears/module-core ^2.0 free, installed by Composer with this module magento/module-backend * magento/module-checkout * magento/module-config * magento/module-customer * magento/module-store * magento/module-ui * magento/module-widget *

Installation

Up and running in minutes

Get it free, create a Composer key in your account, then in the root of your Magento project:

  1. 01Add the repository and your key (once per project)

    composer config repositories.commercegears composer https://repo.commercegears.com
    composer config --auth http-basic.repo.commercegears.com PUBLIC_KEY PRIVATE_KEY
  2. 02Install the module

    composer require commercegears/module-social-login
  3. 03Enable it

    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento setup:static-content:deploy
    bin/magento cache:flush

    The last three are only needed in production mode.

Prefer a zip? Every version you are entitled to can be downloaded from My modules. More about Composer access

User guide

Setting up Social Login

The user guide has its own page: how to install Social Login, what each option does and how to use it in your store. Written for version 2.0.3; a copy ships with the module.

In the guide

Read the user guide

Changelog

Release notes

2.0.3

Latest
  • Improvement: complete and consistent German translation.
  • Improvement: focus outlines follow your theme's colour.

2.0.2

  • Improvement: compatible with Magento 2.4.6 (PHP 8.2).

2.0.1

  • Improvement: user guide screenshots and links updated for the CommerceGears name

2.0.0

  • Improvement: renamed to CommerceGears (new Composer package, admin menu and settings paths)

FAQ

Questions, answered

Something else on your mind? The developers who wrote the module answer before and after you buy.

Ask a question →

Already installed it? Open a support ticket

Which providers are supported?

Google, Facebook and X (Twitter). Each one can be switched on separately, per website or store view.

Can I offer Apple, Microsoft, LinkedIn, Amazon or GitHub as well?

Yes, with the add-on Social Login Pro. It adds these five providers to the same configuration section, buttons, Connected Accounts page and admin tools; everything described here applies to them too.

What happens when a shopper opens the shop from Instagram or Facebook?

Those apps open links in their own built-in browser, where Google does not allow sign-in. Social Login recognises these browsers and shows a note above the buttons asking the shopper to open the page in their browser, with a "Copy link" button. This works on Luma, the checkout and Hyvä.

Does it work with Hyvä?

Yes. Hyvä templates are included (Hyvä 1.3+, tested with 1.5). On the Hyvä checkout the Luma checkout fallback is used, so the checkout buttons are the Luma ones.

Does it install third-party SDKs?

No. OAuth 2.0 and OpenID Connect are implemented on Magento's HTTP client and PHP's OpenSSL extension, so there are no extra libraries to keep up to date or to conflict with other extensions.

Where can the buttons appear?

On the sign-in page, the create-account page, the authentication popup and the checkout sign-in, above the email field in checkout (guests), anywhere as a CMS widget, and anywhere in your layout as a block.

What happens if a customer already has an account with the same email?

The provider is linked to that account. If the provider has verified the address and is responsible for it (for example Gmail addresses at Google), this happens automatically; otherwise, or if you choose so, the customer enters their account password once. After that the provider signs them in directly.

Can I allow only existing customers to sign in with a provider?

Yes: set Create New Accounts to No. Shoppers without an account are asked to register first. This is useful for B2B and trade-only shops.

Does it work with customer approval?

Yes, with CommerceGears Customer Approval: social sign-ups get an approval status like any other registration, and pending or rejected customers are not signed in.

What if the provider does not give an email address?

X never returns one unless your app has the email permission. The customer then enters an email address once; an account created from a typed-in address must be confirmed by email before it can be used.

Can customers remove a connection?

Yes, under My Account > Connected Accounts. The module refuses to remove the last way to sign in (no password and no other provider). Admins can remove links under CommerceGears > Social Login > Linked Accounts.

Is it GDPR friendly?

Only the link between the customer and the provider account is stored, no access tokens. Links are deleted with the customer, and pending sign-in data is deleted after 15 minutes.

How is it protected against account takeover?

Every sign-in uses a single-use state bound to the browser, PKCE where the provider supports it, and full ID token validation (signature, issuer, audience, expiry, nonce). Email addresses are only trusted when the provider has verified them, and accounts from unverified addresses must be confirmed by email first. Return URLs are restricted to your own store.

Can I use different provider apps for each domain?

Yes. All settings, including the credentials, can be set per website and store view. Register one callback URL per store view URL at the provider.

Can I add another provider?

Yes, developers can implement ProviderInterface (or extend AbstractOidcProvider) and register it in di.xml; icons, settings and self-test checks have extension points too. See the README.

What happens to links of a provider that is not installed (for example after removing an add-on)?

They are kept and shown with their provider code in the admin and under Connected Accounts, where they can be removed. They are not counted as a way to sign in, so customers are never left without one.

Which Magento and PHP versions are supported?

Magento Open Source and Adobe Commerce 2.4.6 to 2.4.9, PHP 8.2 to 8.5 (Magento 2.4.6: PHP 8.2).

Support

Help from the developers who wrote it

Social Login Pro

Need Apple, Microsoft, LinkedIn, Amazon or GitHub?

Social Login Pro adds five more providers to the same buttons, settings and account rules.

See Social Login Pro →
FeatureFreePro
Google, Facebook and X
Apple (Sign in with Apple)
Microsoft personal and work accounts
LinkedIn, Amazon and GitHub
All placements, popup, widget and layout block
Account linking rules and Connected Accounts
Hyvä and Luma

From the blog

Guides and articles