mage-os-lab / module-social-login
Social login (Google, Facebook, LinkedIn, Instagram) for Magento 2 / Mage-OS
Package info
github.com/mage-os-lab/module-social-login
Type:magento2-module
pkg:composer/mage-os-lab/module-social-login
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
- ext-curl: *
- ext-json: *
- magento/framework: ^103.0.4
- magento/module-backend: ^102.0.4
- magento/module-checkout: ^100.4.4
- magento/module-config: ^101.2.4
- magento/module-customer: ^103.0.4
- magento/module-store: ^101.1.4
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
- digitalway/module-social-login: *
This package is not auto-updated.
Last update: 2026-12-04 08:22:28 UTC
README
Magento 2 / Mage-OS module to sign in or register with Google, Facebook, LinkedIn and Instagram. The buttons appear on the login page, on the registration page and in the checkout sign-in popup.
- Compatibility: Magento 2.4.6+ / Mage-OS 3.x, PHP 8.1 – 8.5 (tested on Mage-OS 3.5.0, PHP 8.5)
- No external Composer dependencies
- Languages: English, Italian, German, French, Spanish, Dutch, Brazilian Portuguese, Simplified Chinese
Installation
With Composer:
composer require mage-os-lab/module-social-login bin/magento setup:upgrade
In app/code: copy the module files into app/code/MageOS/SocialLogin/, then run bin/magento setup:upgrade.
Configuration
Stores → Configuration → Customers → Social Login: enable the module, then set Enabled, ID and Secret
for each provider. Copy the read-only Redirect URI field into the provider console:
https://<domain>/sociallogin/account/callback/provider/<google|facebook|linkedin|instagram>/.
- Google Cloud Console → APIs & Services → OAuth consent screen: user type "External", then publish it to production.
- Credentials → Create credentials → OAuth client ID → "Web application".
- "Authorized redirect URIs": the Google Redirect URI.
- developers.facebook.com → Create app → type "Consumer" → add the Facebook Login product.
- Facebook Login → Settings → "Valid OAuth Redirect URIs": the Facebook Redirect URI.
- App settings → Basic: privacy policy URL and data deletion instructions URL (required to go Live).
- Permissions used:
email,public_profile(standard access, no App Review).
- linkedin.com/developers → Create app (a linked Company Page is required).
- Products → add Sign In with LinkedIn using OpenID Connect.
- Auth → "Authorized redirect URLs for your app": the LinkedIn Redirect URI.
- In the same Meta app (or a new one) add the Instagram product → "API setup with Instagram login".
- "Business login settings" → "OAuth redirect URIs": the Instagram Redirect URI (HTTPS required).
- Users other than the app testers require App Review with Advanced Access on
instagram_business_basic.
Behaviour
| Situation | Result |
|---|---|
| Social profile already linked | Immediate sign-in |
| Email verified by the provider, existing customer | Link and sign in |
| Verified email, no customer | Account created (welcome email) and signed in |
| Missing (Instagram, Facebook without email) or unverified email | "Complete sign-in" form: email, first name, last name |
| In the form, email of an existing account | No automatic linking: the customer signs in with their password and only then is the social profile linked |
Identities are stored in the mageos_social_identity table (one per provider per customer, website-scoped).
Hyvä
Hyvä themes are supported out of the box: on the login and registration pages the buttons use a
Tailwind template with the standard Hyvä button classes (btn btn-secondary), so no theme
configuration is required. To restyle them, target the mageos-social-login,
mageos-social-login__button and mageos-social-login__button--<provider> classes in the theme.
Documentation
- Configuration: configuration paths,
bin/magento config:setexamples, button icons - How it works: sign-in flow, customer linking rules, identity table, security
- Adding a custom provider: complete example with a new OAuth2 provider
- Troubleshooting: common errors from the provider consoles and their fixes
Known limitations
- Instagram: Business/Creator accounts only, and no email (a Meta limitation since the Basic Display API was retired in December 2024).
- Facebook: the email is missing if the user has no confirmed email or does not grant it.
- Facebook and Instagram accept HTTPS Redirect URIs only: they cannot be tried locally with real apps.
Tests
Unit tests live in Test/Unit/ and use the Magento test framework. Run them from the root of the
Magento / Mage-OS installation where the module is installed:
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/mage-os-lab/module-social-login/Test/Unit
If the module is in app/code, the path is app/code/MageOS/SocialLogin/Test/Unit.