Setting up authorization via social networks in 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

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 (http vs https) 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 = Y in provider config via CSocServAuthManager.

Timeframe

Basic setup of one provider (VKontakte or Google) — 2–3 hours. Three providers with custom button styling and template adaptation — 4–6 hours.