Social Media Authorization Configuration in 1C-Bitrix
Social media authorization reduces friction in registration. Users don't need to create a password or confirm an email — they click a VKontakte, Google, or Facebook button and get into their personal account. In 1C-Bitrix this capability is implemented via the socialservices module.
How it Works in Bitrix
The socialservices module implements OAuth 2.0 for each provider. When clicking the button, the user is redirected to the provider, authorizes there, the provider returns a token to the Bitrix callback URL. The module gets profile data and either authorizes an existing user (by email match or linked account in table b_socserv_user) or creates a new one.
The binding is stored in table b_socserv_user:
| Field | Purpose |
|---|---|
| USER_ID | User ID in b_user |
| EXTERNAL_AUTH_ID | Provider identifier (vkontakte, google, facebook) |
| SOCSERV_USER_ID | Unique user ID at provider |
| PERSONAL_WWW | User profile at provider |
Configuring Providers
Each provider is configured in Settings → Social Networks → Authorization. For each, you need to create an app with the provider and obtain App ID (Client ID) and App Secret.
VKontakte: create app at vk.com/apps?act=manage, type — "Website". In settings specify your domain and callback URL: https://your-site.com/bitrix/tools/oauth/vkontakte.php.
Google: create OAuth client in console.cloud.google.com, type — "Web application". Redirect URI: https://your-site.com/bitrix/tools/oauth/google.php. Enable Google+ API (or People API).
Facebook/Meta: create app at developers.facebook.com, add "Facebook Login" product. In Valid OAuth Redirect URIs specify https://your-site.com/bitrix/tools/oauth/facebook.php.
Authorization Component
Buttons are displayed by the component bitrix:socserv.auth.form or integrated into standard auth form bitrix:system.auth.form:
$APPLICATION->IncludeComponent('bitrix:socserv.auth.form', '', [
'AUTH_SERVICES' => ['vkontakte', 'google'],
'MODE' => 'AUTH', // or 'REGISTRATION'
'REDIRECT_URL' => '/personal/',
]);
The standard component system.auth.form pulls in social network buttons automatically if the socialservices module is enabled and provider settings are configured.
Common Issues
-
Callback URL mismatch — provider returns error
redirect_uri_mismatch. Check exact URL match, including protocol (httpvshttps) and trailing slash. - HTTPS is required — Facebook and Google don't work over HTTP even in development. Use local SSL.
-
User already registered with same email — by default Bitrix creates a new user. To link with existing account, configure parameter
MATCH_BY_EMAIL = Yin provider config viaCSocServAuthManager.
Timeframe
Basic setup of one provider (VKontakte or Google) — 2–3 hours. Three providers with custom button styling and template adaptation — 4–6 hours.







