Skip to main content
You add sign-in through Veriqa to a “1C-Bitrix: Site Management” site with the Veriqa module from the Marketplace. Your visitors scan a QR code or tap a button and confirm the sign-in in their messaging app. On the first sign-in the site creates an account for them. The module plugs Veriqa into the stock “Social services” module, so the platform itself finds, creates and links accounts. The video of a sign-in on a 1C-Bitrix store shows the visitor’s whole path and links to an article about the setup.
Verified on “Site Management: Business” with the module from the Marketplace: sign-in, registration, automatic user creation, and linking a messaging app in the profile.

What you need

  • “1C-Bitrix: Site Management” with the “Social services” module installed;
  • PHP 8.1 or later;
  • a Veriqa server reachable from the site. How to run one is covered in the Self-hosted quickstart;
  • channels connected to the Veriqa server: a bot or a business account in every messaging app people will sign in with. The messaging apps set their own terms for connecting one;
  • for an email typed in at sign-in, Veriqa 0.7.0 or later. Sign-in with a placeholder address works on earlier versions too.

Installation

  1. Install the solution from its Marketplace page or from the site’s admin section, then open Marketplace → Installed solutions → Veriqa → Install. Without the “Social services” module, or on PHP older than 8.1, the installer stops and names the reason.
  2. Register the site as a client on the Veriqa server (next section).
  3. Open Settings → Module settings → Social services, tick Veriqa and fill in the Veriqa block (Module settings). For a separate registration button, also tick Veriqa: registration.
  4. Switch on registration of new users (Registration).

The client on the Veriqa server

The site needs a client of its own on the Veriqa server, with:
  • the redirect URI the module shows under its settings: https://<your site>/bitrix/tools/veriqa.auth/callback.php;
  • a client secret;
  • the scopes openid, profile, email and channel. Without them the server rejects the sign-in with invalid_scope.
For a server configured through environment variables:

Module settings

The settings are in the Veriqa block on the “Social services” page. Each site has its own. The Veriqa: registration button has no settings of its own: it takes the address and the keys from the Veriqa block and always asks for an email. Both buttons lead to the same account.

Registration

For a first sign-in to create an account, two settings are needed:
  • “Allow users to register themselves” in the Main module settings;
  • registration of new users in the “Social services” settings, which is on by default.
Without them a new visitor’s sign-in is refused, and from the outside this looks like a broken sign-in, not a setting. Keep in mind that the first setting also turns on the stock Bitrix registration.

Email

Bitrix requires an email only for a new user, and the requirement can be turned off with main.new_user_email_required. The Email channel sends the address itself. Messaging apps do not, and then the User email setting applies:
  • Placeholder address when the channel sends no email: the account gets an address such as telegram-123@telegram.veriqa.invalid. The .invalid domain is reserved by RFC 2606: mail to such an address goes nowhere, and the account gets neither notifications nor password recovery;
  • Ask for an email at sign-in: the person types an address in the Veriqa window. This needs Veriqa 0.7.0 or later.
The module takes a typed address unconfirmed only when the site has email confirmation of registrations, unique emails and registration by phone number all switched off. Otherwise the account gets a placeholder address until Veriqa confirms the address with a code or a link. That confirmation is switched on on the Veriqa server.

What visitors see

  • Sign-in page (system.auth.authorize): the “Sign in with a messenger” and “Register with a messenger” buttons. The form template needs no changes.
  • Registration page (system.auth.registration): the stock registration form shows no social services, so the module ships the veriqa:auth.buttons component. Add one line to the site template’s copy of the registration form template:
    MODE is register (the default), signin or both. The includeModule check matters if the module is ever removed: without it the platform prints a component error where the button was.
  • Profile (socserv.auth.split): the “Link a messenger” button links a messaging app to an existing account. The linked profile is shown as “Name (Telegram)”.

Your own button look

  • Tick Do not add the Veriqa look of the buttons and style the veriqa and veriqa-register classes and the component’s veriqa-auth-button markup in the site template.
  • Or copy the component’s template into the site template (components/veriqa/auth.buttons/.default) and change it.
  • For a button of your own anywhere on the site, (new \Veriqa\Auth\Provider())->getUrl(['BACKURL' => '/']) returns the link that starts a sign-in. For a sign-in that asks for an email, use \Veriqa\Auth\RegisterProvider.

Uninstalling

Marketplace → Installed solutions → Veriqa → Uninstall removes the event handler, the module’s files under /bitrix/tools, /bitrix/css and /bitrix/components, and the module’s settings. Users who signed in through Veriqa keep their accounts and links: after a new install they sign in to the same accounts.

An integration of your own

A Veriqa server is a standard OpenID Connect provider, and you can write the integration with it yourself, without the module.

What will not work

The built-in COpenIDClient is OpenID 2.0, not OpenID Connect: it has openid.ns and check_authentication, but no id_token, no JWKS and no PKCE. It is fundamentally incompatible with Veriqa. By default the sign-in form shows exactly the services of that era — Livejournal, Rambler, Blogger, Mail.Ru OpenID.

A socialservices provider

The Veriqa module is built the same way, on stock extension points:
  1. a handler for the OnAuthServicesBuildList event returns the provider descriptor (ID / CLASS / NAME / ICON) — after that the button shows up in the sign-in form by itself, with no template changes;
  2. the provider class returns the link to /connect/authorize and handles the return;
  3. CSocServAuth::AuthorizeUser() takes care of finding, creating and linking — the link lands in b_socialservices_user.
An OIDC provider example ships with the platform: apple.php in the socialservices module.
Keep the callback in /local/, not in /bitrix/tools/oauth/ — the /bitrix/ directory is overwritten by updates. The public CSocServAuthManager::Authorize($id) is enough for this.
Without the two settings from Registration, AuthorizeUser returns SOCSERV_REGISTRATION_DENY:

The CUser::GetList trap — required reading

CUser::GetList does not understand the D7 '=FIELD' syntax: it silently drops filter keys it does not recognize and behaves as if there were no filter at all. Fetch() then returns the first row — the user with id 1, the administrator. Code that means “found an existing user and signed them in” turns into signing in as the administrator on every successful OIDC sign-in. There is no bug in Bitrix here: the platform writes those keys correctly. What breaks is mixing dialects in the integration code. The rule is simple: legacy keys with the legacy API, or D7 syntax with UserTable::getList() — never mixed. And look up “your” users through the links in b_socialservices_user, not through b_user fields.

Three more framework pitfalls

  • getUrl() is called twice per form render (GetFormHtml and GetOnClickJs) — memoize the state and PKCE generation per request, or the second call overwrites the first.
  • The core session is already open inside the provider, so you do not need one of your own. session_write_close() cuts off the Bitrix session in the middle of rendering the page.
  • session_name() changes for the whole process. Open your own session without restoring the name before prolog_before.php, and the core opens a session under the wrong cookie: the sign-in “disappears” on the next request.

Accounts

The ownership marker is set by the platform: an account created through the framework gets b_user.EXTERNAL_AUTH_ID = socservices, put there by CSocServAuth::AuthorizeUser itself. Your own provider identifier never reaches that field, so searching by it is pointless. When the channel sends no email, substitute an address of the form {channel}-{id}@{channel}.veriqa.invalid, as the module does. Why such an address is never delivered is explained in Email. The stock checkOldUser recognizes “old scheme” accounts (EXTERNAL_AUTH_ID plus XML_ID directly in b_user) and moves them into the link table without creating duplicates — migrating from an older integration happens on its own.