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
- 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.
- Register the site as a client on the Veriqa server (next section).
- 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.
- 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,emailandchannel. Without them the server rejects the sign-in withinvalid_scope.
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.
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.invaliddomain 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.
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 theveriqa:auth.buttonscomponent. Add one line to the site template’s copy of the registration form template:MODEisregister(the default),signinorboth. TheincludeModulecheck 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
veriqaandveriqa-registerclasses and the component’sveriqa-auth-buttonmarkup 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-inCOpenIDClient 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:
- a handler for the
OnAuthServicesBuildListevent 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; - the provider class returns the link to
/connect/authorizeand handles the return; CSocServAuth::AuthorizeUser()takes care of finding, creating and linking — the link lands inb_socialservices_user.
apple.php in the socialservices module.
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 (GetFormHtmlandGetOnClickJs) — memoize thestateand 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 beforeprolog_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 getsb_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.